set_auth_cookie хук-событие . WP 2.5.0
Fires immediately before the authentication cookie is set.
Использование
add_action( 'set_auth_cookie', 'action_function_name_6447', 10, 6 ); function action_function_name_6447( $auth_cookie, $expire, $expiration, $user_id, $scheme, $token ){ // action... }
- $auth_cookie(строка)
- Authentication cookie value.
- $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' or 'secure_auth'.
- $token(строка)
- User's session token to use for this cookie.
Список изменений
С версии 2.5.0 | Введена. |
С версии 4.9.0 | The $token parameter was added. |
Где вызывается хук
set_auth_cookie
wp-includes/pluggable.php 902
do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme, $token );