Log-out banned users?

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?
 
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.
 
Where do we edit the ban message?

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

library/XenForo/Model/SpamCleaner.php

Rich (BB code):
	protected function _banUser(array $user, array &$log, &$errorKey = '')
	{
		$log['user'] = 'banned';

		if ($ban = $this->getModelFromCache('XenForo_Model_Banning')->getBannedUserById($user['user_id']))
		{
			$existing = true;
		}
		else
		{
			$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.
 
. Otherwise it uses the generic "you_have_been_banned" phrase.

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.
 
The spam cleaner window has an option to email the spammer at the time of cleaning.

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.
 
Top Bottom