wp_generate_auth_cookie
wp_generate_auth_cookie ( $user_id, $expiration, $scheme = 'auth', $token = '' )
Parameters:- (int) user_id User ID.
- (int) expiration The time the cookie expires as a UNIX timestamp.
- (string) scheme Optional. The cookie scheme to use: 'auth', 'secure_auth', or 'logged_in'. Default 'auth'.
- (string) token User's session token to use for this cookie.
Returns:- (string) Authentication cookie contents. Empty string if user does not exist.
Defined at:Change Log: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Generates authentication cookie contents.