auth_cookie_expired action-hookWP 2.7.0

Fires once an authentication cookie has expired.

Usage

add_action( 'auth_cookie_expired', 'wp_kama_auth_cookie_expired_action' );

/**
 * Function for `auth_cookie_expired` action-hook.
 * 
 * @param string[] $cookie_elements Authentication cookie components. None of the components should be assumed to be valid as they come directly from a client-provided cookie value.
 *
 * @return void
 */
function wp_kama_auth_cookie_expired_action( $cookie_elements ){

	// action...
}
$cookie_elements(string[])

Authentication cookie components. None of the components should be assumed to be valid as they come directly from a client-provided cookie value.

  • username(string)
    User's username.

  • expiration(string)
    The time the cookie expires as a UNIX timestamp.

  • token(string)
    User's session token used.

  • hmac(string)
    The security hash for the cookie.

  • scheme(string)
    The cookie scheme to use.

Changelog

Since 2.7.0 Introduced.

Where the hook is called

wp_validate_auth_cookie()
auth_cookie_expired
wp-includes/pluggable.php 739
do_action( 'auth_cookie_expired', $cookie_elements );

Where the hook is used in WordPress

wp-includes/default-filters.php 323
add_action( 'auth_cookie_expired', 'rest_cookie_collect_status' );