set_auth_cookie

ACTION wp-includes\pluggable.php (ligne 1150) github
Fires immediately before the authentication cookie is set.

Paramètres

Entrée :
$auth_cookie, $expire, $expiration, $user_id, $scheme, $token
Sortie :
@param string $auth_cookie Authentication cookie value.
@param int    $expire      The time the login grace period expires as a UNIX timestamp.
@param int    $expiration  The time when the authentication cookie expires as a UNIX timestamp.
@param int    $user_id     User ID.
@param string $scheme      Authentication scheme. Values include 'auth' or 'secure_auth'.
@param string $token       User's session token to use for this cookie.

Utilisation

// Ajouter une fonction au hook action 'set_auth_cookie'
add_action('set_auth_cookie', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($auth_cookie, $expire, $expiration, $user_id, $scheme, $token) {
    // Votre code ici
    error_log('Hook set_auth_cookie déclenché');
}

Actualités

Chargement des actualités...