auth_cookie WordPress Filter Hook

The auth_cookie hook is used to encrypt and set the authentication cookie for a user. This is typically used when a user logs in or registers for an account on a website. The encryption method used is determined by the WordPress secret key.

apply_filters( 'auth_cookie', string $cookie, int $user_id, int $expiration, string $scheme, string $token ) #

Filters the authentication cookie.


Parameters

$cookie

(string)Authentication cookie.

$user_id

(int)User ID.

$expiration

(int)The time the cookie expires as a UNIX timestamp.

$scheme

(string)Cookie scheme used. Accepts 'auth', 'secure_auth', or 'logged_in'.

$token

(string)User's session token used.


Top ↑

Source

File: wp-includes/pluggable.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.0.0The $token parameter was added.
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More