bb_get_user_admin_link

The BuddyPress bb get user admin link function.

Description

bb_get_user_admin_link( (null) $user_id = null ); 

Parameters (1)

0. $user_id — Optional. (null) => null
The user id.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. function bb_get_user_admin_link( $user_id = null ) {  
  2. if( !$user_id || !bb_current_user_can( 'edit_user', $user_id ) ) 
  3. return; 
  4.  
  5. if( !bb_get_user_id( $user_id ) ) 
  6. return; 
  7.  
  8. $uri = bb_get_uri( 'bb-admin/users.php', array( 'action' => 'edit', 'user_id' => $user_id ) ); 
  9.  
  10. return apply_filters( 'bb_get_user_admin_link', $uri, $user_id );