bb_get_usermeta

User meta.

Description

bb_get_usermeta( $user_id, $meta_key ); 

Parameters (2)

0. $user_id
The user id.
1. $meta_key
The meta key.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-meta.php  
  1. function bb_get_usermeta( $user_id, $meta_key ) 
  2. if ( !$user = bb_get_user( $user_id ) ) { 
  3. return; 
  4.  
  5. $meta_key = bb_sanitize_meta_key( $meta_key ); 
  6. if ( !isset( $user->$meta_key ) ) { 
  7. return; 
  8. return $user->$meta_key;