Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

How to code to check if member has multiple membership levels

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › How to code to check if member has multiple membership levels

Tagged: find membership levels, find secondary levels, retrieve additional levels

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 7 months ago by nur.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 12, 2012 at 1:17 pm #7635
    sarnorealroi
    Member

    we are trying to add logic to the emember set up (also running estore).

    We wrote code to check if logged on member is a certain level. How can we check for more then one membership level?

    Thank you

    October 13, 2012 at 3:10 am #50315
    nur
    Member

    Hi sarnorealroi, you can do that using “getUserInfo” method of Emember_Auth class in the following way:

    Code:
    $emember_auth = Emember_Auth::getInstance();
    // to get primary membership level name
    // return type is string
    $primary_level = $emember_auth->getUserInfo(‘user_membership_level_name’);

    // to get a list of additional membership levels (secondary levels)
    // return type is an array of string
    $secondary_levels = $emember_auth->getUserInfo(‘user_additional_membership_level_names’);

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ