bp_get_member_user_id

Get the ID of the current member in the loop.

Description

(string) bp_get_member_user_id(); 

Returns (string)

Member ID.


Usage

  1. if ( !function_exists( 'bp_get_member_user_id' ) ) { 
  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_member_user_id(); 
  7.  

Defined (1)

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

/bp-members/bp-members-template.php  
  1. function bp_get_member_user_id() { 
  2. global $members_template; 
  3. $member_id = isset( $members_template->member->id ) ? (int) $members_template->member->id : false; 
  4.  
  5. /** 
  6. * Filters the ID of the current member in the loop. 
  7. * @since 1.2.0 
  8. * @param int $member_id ID of the member being iterated over. 
  9. */ 
  10. return apply_filters( 'bp_get_member_user_id', $member_id );