动作: set_auth_cookie
在设置身份验证 cookie 之前立即触发。
参数
| 名称 | 类型 | 描述 |
|---|---|---|
| $auth_cookie | string | 身份验证 cookie 值。 |
| $expire | int | 登录宽限期过期时间(UNIX 时间戳)。默认值为 cookie 过期时间之后的 12 小时。 |
| $expiration | int | 身份验证 cookie 过期时间(UNIX 时间戳)。默认值为现在起 14 天。 |
| $user_id | int | 用户 ID。 |
| $scheme | string | 身份验证方案。值包括 'auth' 或 'secure_auth'。 |
| $token | string | 用于此 cookie 的用户会话令牌。 |
版本
- 2.5.0
- 4.9.0:
$token参数已添加。
源码
在 inc/sso/auth-functions.php 第 124 行定义