Support » Fixing WordPress » wp_user_level don’t work as expected

  • hi,

    i am debugging admin login problem, and i needed to experiment with wp_user_level values in database.

    Do you maybe have idea why there is no difference between:
    wp_user_level 10
    and
    wp_user_level 0

    when i change in database, i don’t notice any change.
    i make the change for the user that is admin.
    so no matter user level, this user can access to dashboard.

    admin user has following: wp_capabilities
    a:1:{s:13:”administrator”;s:1:”1″;}

    https://imgur.com/3gI88ac

Viewing 2 replies - 1 through 2 (of 2 total)
  • User levels in WordPress were replaced with roles and capabilities 14 years ago, and deprecated 9 years ago. There might be a plugin here or there that still rely on the user level, but WordPress permissions are now based entirely on their role, and what capabilities that role has.

    @jakept

    thanks for explanation !

    maybe you can help, my user can’t acess to admin dashboard anymore.
    the prefix of the base is “pr_” and not “wp_”

    here is what i have in database for the user id in table pr_capabilities.

    a:2:{s:13:”administrator”;b:1;}

    i also tried this

    a:2:{s:13:”administrator”;s:1;}

    when i access https://____/wp-admin/
    i see message “Sorry, you are not allowed to access this page.”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_user_level don’t work as expected’ is closed to new replies.