1. Home
  2. Knowledge Base
  3. API
  4. Function Reference
  5. Function Reference: wlmapi_is_user_a_member

Function Reference: wlmapi_is_user_a_member

Checks if the specified member belongs to the specified level.

Parameters

  • level_id (int) – The ID of the level to check
  • member_id (int) – The ID of the member to check

Return

Returns TRUE if the user belongs to the level and FALSE if not.

Example Code

<?php
     $check = wlmapi_is_user_a_member(1340726008, 1);
     if ( $check ) {
          echo 'User is a member';
     } else {
          echo 'User is not a member';
     }
?>

Example Output

User is a member

Notes

This functions returns WLMAPIMethods::is_user_a_member($level_id, $member_id) in core/api-helper/class-api-methods.php

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support