set_auth_cookie хук-событие . WP 2.5.0
Fires immediately before the authentication cookie is set.
Использование
add_action( 'set_auth_cookie', 'action_function_name_5954', 10, 6 ); function action_function_name_5954( $auth_cookie, $expire, $expiration, $user_id, $scheme, $token ){ // action... }
- $auth_cookie(строка)
- Authentication cookie.
- $expire(число)
- The time the login grace period expires as a UNIX timestamp.
По умолчанию: 12 hours past the cookie's expiration time - $expiration(число)
- The time when the authentication cookie expires as a UNIX timestamp.
По умолчанию: 14 days from now - $user_id(число)
- User ID.
- $scheme(строка)
- Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'.
- $token(строка)
- User's session token to use for this cookie.
Заметки
- C версии 4.9.0 The
$token
parameter was added.
Где вызывается хук
set_auth_cookie
wp-includes/pluggable.php 890
do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme, $token );