bbp_setup_current_user

Setup the currently logged-in user.

Description

bbp_setup_current_user(); 

Usage

  1. if ( !function_exists( 'bbp_setup_current_user' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/core/sub-actions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_setup_current_user(); 
  7.  

Defined (1)

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

/includes/core/sub-actions.php  
  1. function bbp_setup_current_user() { 
  2.  
  3. // If the current user is being setup before the "init" action has fired,  
  4. // strange (and difficult to debug) role/capability issues will occur. 
  5. if ( ! did_action( 'after_setup_theme' ) ) { 
  6. _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', bbpress ), '2.3' ); 
  7.  
  8. do_action( 'bbp_setup_current_user' );