get_user_link

The BuddyPress get user link function.

Description

get_user_link( (int) $id = 0 ); 

Parameters (1)

0. $id — Optional. (int)
The id.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. function get_user_link( $id = 0 ) { 
  2. if ( $user = bb_get_user( bb_get_user_id( $id ) ) ) 
  3. return apply_filters( 'get_user_link', $user->user_url, $user->ID );