Skip to content

Commit

Permalink
Refactor Profile Builder login.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Jan 15, 2025
1 parent f8a878d commit 8b1b00b
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/php/ProfileBuilder/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,7 @@ public function verify( $user, string $password ) {
return $user;
}

if ( ! $this->is_login_limit_exceeded() ) {
return $user;
}

$error_message = hcaptcha_verify_post(
self::NONCE,
self::ACTION
);

if ( null === $error_message ) {
return $user;
}

$code = array_search( $error_message, hcap_get_error_messages(), true ) ?: 'fail';

return new WP_Error( $code, $error_message, 400 );
return $this->login_base_verify( $user, $password );
}

/**
Expand Down

0 comments on commit 8b1b00b

Please sign in to comment.