bbp_get_user_subscriptions

Get a user's subscribed topics.

Description

(array|bool) bbp_get_user_subscriptions( (int) $user_id = 0 ); 

Returns (array|bool)

Results if user has subscriptions, otherwise false

Parameters (1)

0. $user_id — Optional. (int)
User id

Usage

  1. if ( !function_exists( 'bbp_get_user_subscriptions' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/users/functions.php'; 
  3.  
  4. // Optional. User id 
  5. $user_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_get_user_subscriptions($user_id); 
  9.  

Defined (1)

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

/includes/users/functions.php  
  1. function bbp_get_user_subscriptions( $user_id = 0 ) { 
  2. _deprecated_function( __FUNCTION__, 2.5, 'bbp_get_user_topic_subscriptions()' ); 
  3. $query = bbp_get_user_topic_subscriptions( $user_id ); 
  4. return apply_filters( 'bbp_get_user_subscriptions', $query, $user_id );