bbp_get_current_user_name

Return name of current user.

Description

(string) bbp_get_current_user_name(); 

Returns (string)


Usage

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

Defined (1)

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

/includes/users/template.php  
  1. function bbp_get_current_user_name() { 
  2. global $user_identity; 
  3.  
  4. $current_user_name = is_user_logged_in() ? $user_identity : __( 'Anonymous', bbpress ); 
  5.  
  6. return apply_filters( 'bbp_get_current_user_name', $current_user_name );