WordPress.org

Ready to get started?Download WordPress

Codex

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

Function Reference/wp generate auth cookie

Contents

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