bbp_get_current_user_id

Return ID of current user.

Description

(int) bbp_get_current_user_id(); 

Returns (int)

Current user id


Usage

  1. if ( !function_exists( 'bbp_get_current_user_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/users/template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_get_current_user_id(); 
  7.  

Defined (1)

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

/includes/users/template.php  
  1. function bbp_get_current_user_id() { 
  2. return apply_filters( 'bbp_get_current_user_id', bbp_get_user_id( 0, false, true ) );