wp_login

Fires after the user has successfully logged in.

Description

do_action( 'wp_login', (string) $this_username, (unknown) $user ); 

Parameters (2)

0. $this_username (string)
The this username.
1. $user (unknown)
The user.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'wp_login', $this_username, $user ); 
The following example is for adding a hook callback.
  1. // define the wp_login callback 
  2. function action_wp_login( $this_username, $user ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'wp_login', 'action_wp_login', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'wp_login', 'action_wp_login', 10, 2 ); 

Defined (2)

The action is defined in the following location(s).

/app/model/class-ms-model-member.php  
  1. do_action( 'wp_login', $this->username, $user ); 
/app/controller/class-ms-controller-dialog.php  
  1. do_action( 'wp_login', $member->username, $user_signon );