WordPress.org

Ready to get started?Download WordPress

Forums

Role Manager custom role and using level_X (2 posts)

  1. realtron
    Member
    Posted 5 years ago #

    I made a new role in Role Manager called Premium with user level of 1. I'm trying to limit access to certain forms on the site to users with specific user levels, but using current_user_can('level_XX') only returns true on the Premium users specific role, ie:

    checking current_user_can('level_1') on my Premium user returns TRUE
    checking current_user_can('level_0') returns nothing.

    So if a form element has allows access to level_0 or greater, the Premium user will not see it. This seems like an issue with Role Manager. Is there a way to fix this or work around it?

    PS I know user levels have been deprecated, but I'm really looking for the ability to allow access to users with a certain level OR GREATER. And I need this custom role for a client site.

  2. realtron
    Member
    Posted 5 years ago #

    So basically, I want level_3 roles to be recognized as having level_2, level_1, and level_0 capabilities. And level_5 roles should be recognized as level_4, level_3, etc.

Topic Closed

This topic has been closed to new replies.

About this Topic