1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Log-out banned users?

Discussion in 'Troubleshooting and Problems' started by BGL, Dec 25, 2012.

  1. BGL

    BGL Well-Known Member

    I noticed that banned users are permanently logged in, can't log out and can't send an email to the forum admin to ask for ban to be lifted.

    I'm most concerned that some of what appear to be spammers might be real people and now they can't easily send an email to the forum contact.

    They can delete the auto-login cookie which lets them get back to view as guest and then send an Whatup? email but the concern there is they don't know that or wouldn't bother deleting their cookies to get back.

    Is there a way I could log them off so at least they get access the forum as a guest and contact admin if they were banned in error?
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    If they are logged out then they won't know they are banned until they login again and see the ban message.
  3. Morgain

    Morgain Well-Known Member

    Where do we edit the ban message?
  4. BGL

    BGL Well-Known Member

    If they clicked "Keep Me Logged In" and XenForo sets the auto-logon cookie they don't get a message they are banned, they get an error message to try again. They can't log out at that point and are stuck in a loop.

    I'm concerned the occasional legit user will get caught up in it and with no easy way to send the forum admin a message, they'll just go away.

    I suppose I should come up with an email message when banning with instructions to clear cookies to get rid of auto-logon and to click the "Contact Us" link if they feel they have been banned in error.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    For the spam cleaner the ban reason is hard-coded:


    	protected function _banUser(array $user, array &$log, &$errorKey = '')
    		$log['user'] = 'banned';
    		if ($ban = $this->getModelFromCache('XenForo_Model_Banning')->getBannedUserById($user['user_id']))
    			$existing = true;
    			$existing = false;
    		return $this->getModelFromCache('XenForo_Model_User')->ban(
    			$user['user_id'], XenForo_Model_User::PERMANENT_BAN, 'Spam', $existing, $errorKey
    The message on the front end will use the reason if one is defined in the ban record (referenced in the "you_have_been_banned_for_following_reason_x" phrase). Otherwise it uses the generic "you_have_been_banned" phrase.
  6. BGL

    BGL Well-Known Member

    Does the message go to their email? None of have reported any kind of email. They get the error message accessing the forum but no message saying they've been banned since they can't log in to get it.
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The spam cleaner window has an option to email the spammer at the time of cleaning.
  8. BGL

    BGL Well-Known Member

    I'm usually a step ahead of the spammers so I'm not cleaning spam so much as just banning the spammer ID's that get through the anti-spam add-ons. I think that has an email option also. I guess I'll have to use that.

    But it would be nice to be able to log the person out and have them get a "You've been banned because" message when they logged on. Now it looks like some network or program bug.

Share This Page