Many plugins (and themes) use user levels, you shouldn’t use them in yours. They are still used in WordPress probably to offer backward compatibility with the huge number of plugins and themes that use them.
WPCS will throw a warning whenever it busts user levels in code.
Related Posts:
- \WP_User Object | What’s the Difference Between {caps} and {allcaps}?
- Is there a simple way to manage capabilities per user?
- Can I Create a Second Admin Level User Role?
- Assigning multiple or additional capabilities to specific users or how to create additional roles like bbpress roles?
- how do I add role and capability after I create a new user
- current_user_can() returning true for capability when the user and role do not have the capability
- Editor can create any new user except administrator
- Remove Ability for Other Users to View Administrator in User List?
- Groups of capabilities: users with multiple roles?
- User-edit role setting distinct from wp_capabilities? [closed]
- How to let contributors to create a new revision(draft) editing their published posts
- Disallowing Users of a Custom Role from Deleting or Adding Administrators?
- Add Custom User Capabilities Before or After the Custom User Role has Been Added?
- Grouping users under parent user
- How to update user role without logout
- How to check user role without using current_user_can()
- Do not allow users to create new posts and pages
- How to enable the theme editor cap for an editor role?
- How to assign capabilities to user NOT to User Role
- How-to Delay The Capability To Publish Posts?
- Can I create users that have access to *some* other users posts instead of all other users posts?
- Set default page for user account in admin
- Get User Role by ID not working
- Getting users by specific capability, not role
- Managing Users and Creating Groups [closed]
- Roles for Custom Post Types
- Remove Capabilities from WP admin for specific user role
- Updating wp_user_level on user update
- Fix permissions for users role
- Add a role and give admin priviledges
- Where are $current_user->allcaps set?
- How do I let contributors edit their posts after being approved once?
- How can I prevent certain custom roles from seeing other custom roles on the user list page?
- What’s the correct way to add capabilites to user roles?
- Does it matter if the very first user, usually Admin, does not have a user ID of 1?
- Groups and subgroups for permission
- Update user role for expired membership
- How to make WordPress ‘editor’ role to list/view/add/edit users only with the role ‘author’?
- Hook into add_user_role and update based on new and removed roles
- How to Moderate Edits to User Profiles?
- fine-grained capabilities for user related capabilities
- Disabling user capability to edit_posts or delete_posts in the front-end
- User Permissions on custom post type
- In admin manage users page, how can I stop users with certain privileges from editing users with other privileges?
- Groups roles & capabilities
- WordPress install checking permissions of user id 0
- Subscriber role – blank page
- Creating Custom user type just like custom post
- If the current user is an administrator or editor
- user_login vs. user_nicename
- Execute a function when admin changes the user role
- Extending WP_User class and using this sub-class during the whole lifecycle
- Show Biographical Info while creating new user
- WordPress keeps asking for connection information in localhost
- How do I properly format the user_role array?
- Reapproval for edits and deletion after post is published
- Hide a user from WordPress
- Redirect after login based on user role (custom login page)
- How to remove sticky post capability for a specific user role?
- Delete user from frontend
- Tagging users in WordPress
- Redirect after users complete profile form
- Log all users out of all locations after 24 hours
- add_cap not working with Shop Manager role
- User Last Login Sort Column
- WordPress User Meta & ChromePHP or other way to debug/view php variables
- How to disable a specific page for a specific user
- Displaying different in-page content to cliente/admin
- User capability for editing their own comments
- Allow Contributors to Upload Files
- Users create/join groups
- users and usermeta table
- “the_author_meta(‘url’)” not working inside “href”
- User roles not displaying
- Allow admins to login as other users
- Custom capability for a single user
- Preventing role reading others posts
- Change User Role based on Point System Issue
- delete_user_meta from a foreach results page
- Show posts who published after registration date
- How to hide “Change role to” dropdown on Users admin menu
- Get UserInfo from WordPress
- hide page menu from admin panel for specific users
- REST_query_vars for users
- User Role not showing in Users Screen
- Allowing users to edit only their page and nobody else’s
- How to bulk change user role to “No role for this site”
- User management missing after migration to new host
- Hide user fields based off capability
- Display and Allow users to edit their own profiles
- Validate user meta and redirect
- Let admin users edit member profiles from front end
- Does WordPress Need BuddyPress to Handle Large Amounts of Users?
- Want to add post to user dashboard
- Store subscription details for users in WordPress
- No one can edit post/pages by Administrator
- How to add custom detail page for a Subscriber at Admin Panel
- How to give access to the particular page in wordpress for specific username/email NOT roles [closed]
- How to create a specific role to manage users
- Export user data from Squirrly’s Starbox plugin?