Skip to:
Content
Pages
Categories
Search
Top
Bottom

Blocked user login (back link)

  • 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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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();

    }

    }

    Filed a ticket for this issue as it’s still present in r2442:

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar