Title: User level code deprecated &#8211; is this an error?
Last modified: August 24, 2016

---

# User level code deprecated – is this an error?

 *  [baldarch](https://wordpress.org/support/users/baldarch/)
 * (@baldarch)
 * [11 years ago](https://wordpress.org/support/topic/user-level-code-deprecated-is-this-an-error/)
 * Hi
 * I have just commenced using Debug Bar and am seeing an error on sites with current
   WordPress 4.2.2:
 * wp-admin/menu-header.php:155 – Usage of user levels by plugins and themes is 
   deprecated. Use roles and capabilities instead.
    require_once(‘wp-admin/admin-
   header.php’), require(‘wp-admin/menu-header.php’), _wp_menu_output, current_user_can
 * Is this a true error? Or just that the method is deprecated? It’s in the Codex:
   
   [https://codex.wordpress.org/Function_Reference/current_user_can](https://codex.wordpress.org/Function_Reference/current_user_can)
 * Do I need to take any action?
 * Your advice would be appreciated.
 * [https://wordpress.org/plugins/debug-bar/](https://wordpress.org/plugins/debug-bar/)

Viewing 1 replies (of 1 total)

 *  [Curtiss Grymala](https://wordpress.org/support/users/cgrymala/)
 * (@cgrymala)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/user-level-code-deprecated-is-this-an-error/#post-6140619)
 * The `current_user_can()` function itself is not deprecated.
 * The notice you’re receiving is because there’s a plugin/theme somewhere in your
   system that, instead of checking user capabilities with something like `current_user_can('
   manage_options' )` is using the numerical user levels, like `current_user_can(
   7 )`.
 * The numerical user levels were deprecated a long time ago, but some plugins/themes
   still use them.
 * [http://codex.wordpress.org/Roles_and_Capabilities#User_Levels](http://codex.wordpress.org/Roles_and_Capabilities#User_Levels)

Viewing 1 replies (of 1 total)

The topic ‘User level code deprecated – is this an error?’ is closed to new replies.

 * ![](https://ps.w.org/debug-bar/assets/icon.svg?rev=3050748)
 * [Debug Bar](https://wordpress.org/plugins/debug-bar/)
 * [Support Threads](https://wordpress.org/support/plugin/debug-bar/)
 * [Active Topics](https://wordpress.org/support/plugin/debug-bar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/debug-bar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/debug-bar/reviews/)

## Tags

 * [current_user_can](https://wordpress.org/support/topic-tag/current_user_can/)
 * [user levels](https://wordpress.org/support/topic-tag/user-levels/)

 * 1 reply
 * 2 participants
 * Last reply from: [Curtiss Grymala](https://wordpress.org/support/users/cgrymala/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/user-level-code-deprecated-is-this-an-error/#post-6140619)
 * Status: not resolved