is there a global variable that holds the current user's Access Level?

hi there, I had trouble determining through the documentation what information is available. what i need is a global (or way of determining programatically) that can give me feedback as to what Access Level the currently logged in user has.

  • Kimberly
    • Champion of Loops

    Mark,

    Hi and Welcome to WPMU forums!

    I'm not 100% sure what you are asking for but I will take my best shot :slight_smile:

    If you hover over the level name on the Access Level you can see what the Level ID is. This will be unique to each level.

    You will also see a link displayed that will give you more info on the Level.

    Hope this helps!

    If not feel free to re-open and let me know that I've missed the boat :slight_smile:

    Best,

    Kimberly

  • Jonathan
    • The Incredible Code Injector

    Yes, membership plugin comes with a list of ways to do this... here are the top three

    current_user_is_member()
    current_user_on_level($level_id)
    current_user_on_subscription($sub_id)

    example

    if ( current_user_on_level($levelid) ) {
    		//yes he is on levelid
    	} else {
    // no he isn't on that levelid
    }

    Edit: Oops, I think I understand what you are after. Try looking at the account page code, I believe it has the code you are looking for.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.