WordPress.org

Codex

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

Plugin API/Action Reference/set logged in cookie

Description

set_logged_in_cookie is an action that fires immediately before the secure authentication cookie is set.

Parameters

$logged_in_cookie
(string) (required) The logged in cookie.
Default: None
$expire
(int) (required) Login grace period in seconds. Default 43,200 seconds, or 12 hours.
Default: None
expiration
(int) (required) Duration in seconds the authentication cookie should be valid. Default 1,209,600 seconds, or 14 days.
Default: None
$user_ID
(int) (required) User ID.
Default: None
$scheme
(string) (required) Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'.
Default: None

Examples

add_action( 'set_logged_in_cookie', 'my_cookie_action', 10, 5 );
function my_cookie_action( $logged_in_cookie, $expire, $expiration, $user_id, $scheme ) {
    // complete some action when the cookie is set.
    return;
}

Change Log

Since: Version 2.6

Source File

set_logged_in_cookie is located in wp-includes/pluggable.php

Related