bbp_user_id

Output a validated user id.

Description

Parameters (3)

0. $user_id — Optional. (int)
User id
1. $displayed_user_fallback — Optional. (constant) => true
The displayed user fallback.
2. $current_user_fallback — Optional. (bool) => false
The current user fallback.

Usage

  1. if ( !function_exists( 'bbp_user_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/users/template.php'; 
  3.  
  4. // Optional. User id 
  5. $user_id = -1; 
  6.  
  7. // The displayed user fallback. 
  8. $displayed_user_fallback = true; 
  9.  
  10. // The current user fallback. 
  11. $current_user_fallback = false; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bbp_user_id($user_id, $displayed_user_fallback, $current_user_fallback); 
  15.  

Defined (1)

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

/includes/users/template.php  
  1. function bbp_user_id( $user_id = 0, $displayed_user_fallback = true, $current_user_fallback = false ) { 
  2. echo bbp_get_user_id( $user_id, $displayed_user_fallback, $current_user_fallback );