The MU forums have moved to WordPress.org

Problem with remove_user_from_blog() (5 posts)

  1. mdgross
    Member
    Posted 13 years ago #

    Fatal error: Call to undefined function wp_revoke_user()

    $user_blogs = get_blogs_of_user($id);
    if(sizeof($user_blogs) > 1 && is_user_member_of_blog($id, 1)) {
    	remove_user_from_blog($id, 1);
    }

    I could've sworn I've used remove_user_from_blog() in past development. I checked wp-includes/wpmu-functions.php and its there.

  2. tdjcbe
    Member
    Posted 13 years ago #

    It looks like wp_revoke_user is no more:

    http://trac.mu.wordpress.org/changeset/1564

    remove_user_from_blog() is still active though. wp_revoke_user() is now commented out from within that function.

    Take a look at your wp-includes/wpmu-functions.php. Not sure what version you;re running. You may have missed a change.

  3. mdgross
    Member
    Posted 13 years ago #

    Currently I'm on 2.6.1. Do you think its safe to manually comment out this line? I'm using a lot of highly customized plug-ins and am hesitant to upgrade at this time.

  4. tdjcbe
    Member
    Posted 13 years ago #

    Honest answer: Not a clue. Best bet would be to give it a try and see what happens. If you have a testbed, I'd try it over there first.

  5. MrBrian
    Member
    Posted 13 years ago #

    Youd be fine commenting it out.

About this Topic