auth_cookie_valid WordPress Action Hook
The auth_cookie_valid hook is used to validate authentication cookies. It is called whenever a user logs in, and is used to make sure that the user's login credentials are valid. This hook is also used to make sure that the user's session has not expired.
do_action( 'auth_cookie_valid', string[] $cookie_elements , WP_User $user ) #
Fires once an authentication cookie has been validated.
Parameters
- $cookie_elements
(string[])Authentication cookie components.
- '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.
- 'username'
- $user
(WP_User)User object.
Source
Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |