Forums

Join
bbPress Support ForumsTroubleshootingBlocked user login (back link)

Info

Blocked user login (back link)

  1. Hi trying out bbPress 1.0.2 and stumbeled on a litte "problem".
    When setting a user to blocked and that user tries to login he/she is presented whit a "you are blocked" notice, and presented with a "back to forum main page" link.

    The problem is that the back to forum main page link doeasn't take to user back to the forum main page. He/she is only presented whit the same notice again..

    Tried to use bb-login.php?logout=1 to see if user gets back in then, but it doesnt help.
    The user has to either close his/hers browser or manually delete the cookie in browser.

    Looked at the bug track system, but no mention of this there.

    This is not a major problem since user has most likely been blocked for a reason, but what if an error has been done, and user wants to go back to main forum page and contact admin?

  2. Here is a solution I found...
    There is probably a better solution, but this fixes the going back to front page for blocked users...

    Add this code to bb-includes/functions.bb-core.php line 1183

    // If user blocked logout user and clear auth_cookie
    if ( $id = bb_get_current_user_info( 'id' ) ) {
    if( bb_get_usermeta( $id, 'been_blocked' ) === "1") {
    bb_logout();
    bb_clear_auth_cookie();
    }
    }

  3. Filed a ticket for this issue as it's still present in r2442:

    http://trac.bbpress.org/ticket/1292

  4. You must log in to post.