Skip to content

wp_login hook not firing on login for users with a two-factor option enabled #592

@adriantoll

Description

@adriantoll

Describe the bug

The wp_login hook is not firing after a successful login for users with a two-factor option enabled when using a fresh installation with only Two Factor installed.

Steps to Reproduce

  1. Install WordPress
  2. Install Two Factor
  3. Enable Email 2FA for the user and log out
  4. Add this code to the top of the functions.php file of the twentytwentyfour theme:
function namespace_user_login( $user_login, $user ) {
  error_log('wp_login');
}
add_action( 'wp_login', 'namespace_user_login', 10, 2 );
  1. Log in again
  2. Check the error log - there is no wp_login message, and there are no other error messages.

Environment information

  • WordPress version 6.4.2
  • Twenty Twenty Four theme version 1.0
  • Two Factor version 0.8.2
  • PHP version 8.1

Please confirm that you have searched existing issues in this repository.

Yes

Please confirm that you have tested with all plugins deactivated except Two-Factor.

Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions