Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_set_auth_cookie()

3 tags 1 category

wp_set_auth_cookie() — Sets the authentication cookies for a given user ID. The $remember parameter controls cookie persistence: If true, the cookie is persistent (default 14 days, filterable via ‘auth_cookie_expiration’). If false, the cookie is a browser session cookie (expires when the browser closes). Internally, ‘auth_cookie_expiration’ is still applied, to expire the login after two days or when the browser is closed, whichever occurs first.

Inputs: $user_id (int): User ID. $remember (bool): Whether to remember the user. $secure (bool|string): 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. $token (string): Optional. User’s session token to use for this cookie.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…