wp_login action-hookWP 1.5.0

Fires after the user has successfully logged in.

Usage

add_action( 'wp_login', 'wp_kama_login_action', 10, 2 );

/**
 * Function for `wp_login` action-hook.
 * 
 * @param string  $user_login Username.
 * @param WP_User $user       WP_User object of the logged-in user.
 *
 * @return void
 */
function wp_kama_login_action( $user_login, $user ){

	// action...
}
$user_login(string)
Username.
$user(WP_User)
WP_User object of the logged-in user.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

wp_signon()
wp_login
wp-includes/user.php 121
do_action( 'wp_login', $user->user_login, $user );

Where the hook is used in WordPress

Usage not found.