Skip to main content

i4w_authenticated_login

Usage

This hook allows you to run your own code immediately after a user (either a local or an Keap-based subscriber) has authenticated during the login process.

Parameters

iMember360 will pass the following parameters to your action function:

ParameterDescription
$wp_userThe standard WordPress user object for the person who just logged in.
$contactArray containing all contact record fields for the person who just logged in.

Example

PHP
function my_i4w_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 Keap-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('i4w_authenticated_login', 'my_i4w_authenticated_login', 10, 2);