bb_clear_auth_cookie

The BuddyPress bb clear auth cookie function.

Description

bb_clear_auth_cookie(); 

Usage

  1. if ( !function_exists( 'bb_clear_auth_cookie' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bb_clear_auth_cookie(); 
  7.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php  
  1. function bb_clear_auth_cookie() { 
  2. global $bb, $wp_auth_object; 
  3.  
  4. $wp_auth_object->clear_auth_cookie(); 
  5.  
  6. // Old cookies 
  7. setcookie($bb->authcookie, ' ', time() - 31536000, $bb->cookiepath, $bb->cookiedomain); 
  8. setcookie($bb->authcookie, ' ', time() - 31536000, $bb->sitecookiepath, $bb->cookiedomain); 
  9.  
  10. // Even older cookies 
  11. setcookie($bb->usercookie, ' ', time() - 31536000, $bb->cookiepath, $bb->cookiedomain); 
  12. setcookie($bb->usercookie, ' ', time() - 31536000, $bb->sitecookiepath, $bb->cookiedomain); 
  13. setcookie($bb->passcookie, ' ', time() - 31536000, $bb->cookiepath, $bb->cookiedomain); 
  14. setcookie($bb->passcookie, ' ', time() - 31536000, $bb->sitecookiepath, $bb->cookiedomain);