Wordpress 钩子:set_auth_cookie
文章目录
在设置身份验证Cookie之前立即触发。
原型
do_action( 'set_auth_cookie', string $auth_cookie, int $expire, int $expiration, int $user_id, string $scheme, string $token )
参数
$auth_cookie
(string)
身份验证Cookie。
$expire
(int)
登录宽限期到期的时间作为UNIX时间戳。默认值是Cookie过期时间的12小时。
$expiration
(int)
身份验证Cookie作为UNIX时间戳过期的时间。默认是14天后。
$user_id
(int)
用户身份。
$scheme
(string)
认证方案。值包括’auth’,‘secure_auth’或’logged_in’。
$token
(string)
用户的会话令牌用于此cookie。
源文件
路径:wp-includes/pluggable.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/set_auth_cookie/
文章作者 iBllex
上次更新 2019-02-12