One Lock, One Key: Why a WordPress Login Breaks From a Single Wrong Return
The Problem A developer adds a custom check to the authenticate filter — say, blocking login for users with an unverified email. The simplest approach: return false if…

Action Hook since 1.5.1
Fires after a user has successfully logged in
wp_login fires only on a successful authentication — pair it with wp_login_failed to cover both outcomes.
Right after credentials are validated, before the redirect to wp-admin or the requested page.
do_action( 'wp_login', string $user_login, WP_User $user );$user_login string — Username of the user who logged in.$user WP_User — WP_User object of the logged-in user.add_action( 'wp_login', function( $user_login, $user ) {
update_user_meta( $user->ID, 'last_login', current_time( 'mysql' ) );
}, 10, 2 );Record a last-login timestamp for every user.
The Problem A developer adds a custom check to the authenticate filter — say, blocking login for users with an unverified email. The simplest approach: return false if…
No — it fires only for the standard wp_signon() cookie-based login flow, not REST authentication.
Source: wp-includes/user.php
One session: this hook, then each related_hooks entry. Walk it and tell us what to change.
wp_login → user_register → login_url
Practice the wp_login WordPress action hook in our interactive sandbox — a VS Code-style editor with a step-by-step wp_login tutorial, add_action exercises, and instant feedback. No local WordPress install required.