auth_cookie

Filters the authentication cookie.

Description

apply_filters( 'auth_cookie', (unknown) $cookie, (unknown) $user_id, (unknown) $expiration, (unknown) $scheme ); 

Parameters (4)

0. $cookie (unknown)
The cookie.
1. $user_id (unknown)
The user id.
2. $expiration (unknown)
The expiration.
3. $scheme (unknown)
The scheme.

Usage

To run the hook, copy the example below.
  1. $cookie = apply_filters( 'auth_cookie', $cookie, $user_id, $expiration, $scheme ); 
  2.  
  3. if ( !empty( $cookie ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the auth_cookie callback 
  2. function filter_auth_cookie( $cookie, $user_id, $expiration, $scheme ) { 
  3. // make filter magic happen here... 
  4. return $cookie
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'auth_cookie', 'filter_auth_cookie', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'auth_cookie', 'filter_auth_cookie', 10, 4 ); 

Defined (1)

The filter is defined in the following location(s).

/bp-forums/bbpress/bb-includes/backpress/class.wp-auth.php  
  1. return apply_filters( 'auth_cookie', $cookie, $user_id, $expiration, $scheme );