Make WordPress Core

Changeset 41365


Ignore:
Timestamp:
09/10/2017 09:08:19 PM (8 years ago)
Author:
johnbillion
Message:

Login and Registration: Pass the user session token to the set_auth_cookie and set_logged_in_cookie filters.

This also adds some missing @since parameters for other uses of the token so that developers know when the token was first made available to various filters.

Fixes #41849

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r41213 r41365  
    695695 *
    696696 * @since 2.5.0
     697 * @since 4.0.0 The `$token` parameter was added.
    697698 *
    698699 * @param int    $user_id    User ID
     
    727728     *
    728729     * @since 2.5.0
     730     * @since 4.0.0 The `$token` parameter was added.
    729731     *
    730732     * @param string $cookie     Authentication cookie.
     
    875877     *
    876878     * @since 2.5.0
     879     * @since 4.9.0 The `$token` parameter was added.
    877880     *
    878881     * @param string $auth_cookie Authentication cookie.
     
    883886     * @param int    $user_id     User ID.
    884887     * @param string $scheme      Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'.
    885      */
    886     do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme );
     888     * @param string $token       User's session token to use for this cookie.
     889     */
     890    do_action( 'set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme, $token );
    887891
    888892    /**
     
    890894     *
    891895     * @since 2.6.0
     896     * @since 4.9.0 The `$token` parameter was added.
    892897     *
    893898     * @param string $logged_in_cookie The logged-in cookie.
     
    898903     * @param int    $user_id          User ID.
    899904     * @param string $scheme           Authentication scheme. Default 'logged_in'.
    900      */
    901     do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' );
     905     * @param string $token            User's session token to use for this cookie.
     906     */
     907    do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in', $token );
    902908
    903909    /**
Note: See TracChangeset for help on using the changeset viewer.