bp_get_displayed_user_email

Get the email address of the displayed user.

Description

(string) bp_get_displayed_user_email(); 

Returns (string)


Usage

  1. if ( !function_exists( 'bp_get_displayed_user_email' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-members/bp-members-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_displayed_user_email(); 
  7.  

Defined (1)

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

/bp-members/bp-members-template.php  
  1. function bp_get_displayed_user_email() { 
  2. $bp =buddypress); 
  3.  
  4. // If displayed user exists, return email address. 
  5. if ( isset( $bp->displayed_user->userdata->user_email ) ) 
  6. $retval = $bp->displayed_user->userdata->user_email; 
  7. else 
  8. $retval = ''; 
  9.  
  10. /** 
  11. * Filters the email address of the displayed user. 
  12. * @since 1.5.0 
  13. * @param string $retval Email address for displayed user. 
  14. */