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
- (mixed) $secure Whether the admin cookies should only be sent over HTTPS. Default is_ssl().
- (string) $token Optional. User's session token to use for this cookie.
- Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Log in a user by setting authentication cookies.
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.