Log in

View Full Version : Banned Users


Jaejoong1
02-29-2012, 03:00 AM
Is there anyway to disallow currently banned users from registering again?

I dont want to ban their IPs as i may forget to unban them after the temporary ban.

Jaejoong1
03-01-2012, 08:46 PM
A little bump?

greetingsjb
03-01-2012, 09:12 PM
I think this is what you're looking for sir.

https://vborg.vbsupport.ru/showthread.php?t=199077

We use it on 3.8.1 and love it.

Jaejoong1
03-02-2012, 03:12 PM
I'm not trying to prevent them from registering, i'm simply trying to make it so that their IPs are banned while they're temp banned .

kh99
03-02-2012, 05:00 PM
You could try this: create a new plugin using hook register_start and this code:

$banned_result = $vbulletin->db->query_first_slave(
"SELECT * FROM
(SELECT userid, ipaddress FROM " .TABLE_PREFIX . "user WHERE usergroupid = 8) AS banned
LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.userid = banned.userid)
WHERE banned.ipaddress = '" . IPADDRESS . "' OR post.ipaddress = '" . IPADDRESS . "'
LIMIT 1");

if ($banned_result)
{
standard_error("You cannot register from this ip");
// to use a phrase here, change to standard_error(fetch_error('phrase_name'));
}


I've only done very basic testing.