wp_set_auth_cookie ( $user_id, $remember = false, $secure = '', $token = '' )
Defined at:Change Log:
- (int) user_id User ID.
- (bool) remember Whether to remember the user.
- (bool|string) secure Whether the auth cookie should only be sent over HTTPS. Default is an empty string which means the value of `is_ssl()` will be used.
- (string) token Optional. User's session token to use for this cookie.
- Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Sets the authentication cookies based on user ID.The $remember parameter increases the time that the cookie will be kept. The
default the cookie is kept without remembering is two days. When $remember is
set, the cookies will be kept for 14 days or two weeks.