WordPress.org

Ready to get started?Download WordPress

Forums

WP_User->remove_role wrong -- code change (3 posts)

  1. javalizard
    Member
    Posted 5 years ago #

    Can someone _please_ update the code in capabilities.php from this

    if ( empty($this->roles[$role]) || (count($this->roles) <= 1) )

    to this:

    if ( empty($this->caps[$role]) || (count($this->caps) <= 1) )

    It's on line 202 of version 2.6.2 capabilities.php. This issue has been around for a very long time and it's stopping me from removing a role from a user.

    Can someone take a few moments and update this one line of code?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    If this is a bug, you should post it on the bug tracker.

    All code changes go through there.

  3. javalizard
    Member
    Posted 5 years ago #

    It's now on line 568 of capabilities.php in version 2.7.

    I tried adding a bug to the tracker but it didn't let me.

Topic Closed

This topic has been closed to new replies.

About this Topic