mbr/authenticated_login
Usage
This action hook allows you to run your own code immediately after either a local or remote user has authenticated during the login process.
Parameters
Parameters | Description |
---|---|
$wp_user | The standard WordPress user object for the user who just logged in. |
$contact | Contains an array of the contact record fields for the user who just logged in. |
Examples
- Example 1
function my_mbr_authenticated_login($wp_user, $contact) {
// $wp_user is the user object (same as the standard $current_user)
// $contact is an array with all contact record fields. This array is
// only relevant if the user is an ActiveCampaign-based contact
// add your code to perform any desired action, such as sending an email notification
// or updating contact record to reflect the login that just took place
$your_code_goes_here = true;
}
add_action('mbr/authenticated_login', 'my_mbr_authenticated_login',10,2);