Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp generate auth cookie

This page redirects to an external site: https://developer.wordpress.org/reference/functions/wp_generate_auth_cookie/

Description

Generate authentication cookie contents.

@uses apply_filters() Calls 'auth_cookie' hook on $cookie contents, User ID and expiration of cookie.

Parameters

$user_id
(integer) (required) User ID
Default: None
$expiration
(integer) (required) Cookie expiration in seconds
Default: None
$scheme
(string) (optional) Optional. The cookie scheme to use: auth, secure_auth, or logged_in
Default: auth

Return Values

(string) 
Authentication cookie contents

Change Log

Since: 2.5

Source File

wp_generate_auth_cookie() is located in wp-includes/pluggable.php