current_user_on_level

The Membership 2 current user on level function.

Description

current_user_on_level( $level_id ); 

Parameters (1)

0. $level_id
The level id.

Usage

  1. if ( !function_exists( 'current_user_on_level' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'membership-2/app_old/membershipincludes/includes/functions.php'; 
  3.  
  4. // The level id. 
  5. $level_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = current_user_on_level($level_id); 
  9.  

Defined (1)

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

/app_old/membershipincludes/includes/functions.php  
  1. function current_user_on_level( $level_id ) { 
  2.  
  3. $user = wp_get_current_user(); 
  4. $member = new M_Membership( $user->ID ); 
  5.  
  6. if(!empty($member)) { 
  7. return $member->on_level( $level_id, true ); 
  8. } else { 
  9. return false; 
  10.