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

  1. javalizard
    Posted 7 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. If this is a bug, you should post it on the bug tracker.

    All code changes go through there.

  3. javalizard
    Posted 7 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