bp_core_get_userlink_by_email

Return the user link for the user based on user email address.

Description

(string) bp_core_get_userlink_by_email( (string) $email ); 

Returns (string)

The link to the users home base. False on no match.

Parameters (1)

0. $email (string)
The email address for the user.

Usage

  1. if ( !function_exists( 'bp_core_get_userlink_by_email' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-members/bp-members-functions.php'; 
  3.  
  4. // The email address for the user. 
  5. $email = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_core_get_userlink_by_email($email); 
  9.  

Defined (1)

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

/bp-members/bp-members-functions.php  
  1. function bp_core_get_userlink_by_email( $email ) { 
  2. $user = get_user_by( 'email', $email ); 
  3.  
  4. /** 
  5. * Filters the user link for the user based on user email address. 
  6. * @since 1.0.1 
  7. * @param string|bool $value URL for the user if found, otherwise false. 
  8. */ 
  9. return apply_filters( 'bp_core_get_userlink_by_email', bp_core_get_userlink( $user->ID, false, false, true ) );