bb_validate_auth_cookie

The BuddyPress bb validate auth cookie function.

Description

bb_validate_auth_cookie( (string) $cookie = '', (string) $scheme = 'auth' ); 

Parameters (2)

0. $cookie — Optional. (string) => ''
The cookie.
1. $scheme — Optional. (string) => 'auth'
The scheme.

Usage

  1. if ( !function_exists( 'bb_validate_auth_cookie' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php'; 
  3.  
  4. // The cookie. 
  5. $cookie = ''; 
  6.  
  7. // The scheme. 
  8. $scheme = 'auth'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_validate_auth_cookie($cookie, $scheme); 
  12.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php  
  1. function bb_validate_auth_cookie( $cookie = '', $scheme = 'auth' ) { 
  2. global $wp_auth_object; 
  3. if ( empty($cookie) && $scheme == 'auth' ) { 
  4. if ( is_ssl() ) { 
  5. $scheme = 'secure_auth'; 
  6. } else { 
  7. $scheme = 'auth'; 
  8. return $wp_auth_object->validate_auth_cookie( $cookie, $scheme );