wp_validate_auth_cookie
wp_validate_auth_cookie ( $cookie = '', $scheme = '' )
Parameters:- (string) cookie Optional. If used, will validate contents instead of cookie's.
- (string) scheme Optional. The cookie scheme to use: 'auth', 'secure_auth', or 'logged_in'.
Returns:- (int|false) User ID if valid cookie, false if invalid.
Defined at: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Validates authentication cookie.The checks include making sure that the authentication cookie is set and
pulling in the contents (if $cookie is not used).
Makes sure the cookie is not expired. Verifies the hash in cookie is what is
should be and compares the two.