Largo .//npc
12-01-2009, 09:48 AM
This is the first time I've coded anything for vB. I can do SMF easily, but vB is a bit more complex imo.
So anyway, I want to ban a user if a certain string is in a custom user field.
I'd like to have the user banned right away. How would I go about doing this?
I don't want to simply stop them registering, I want to let them register and ban them instantly.
I was going to use a cron job for this, but it wouldn't work out.
The reason for this is that Spammers keep registering on our site and leaving a certain drop down box on it's default setting, so we added a new default value for that drop down box and the spammers are now using that where-as anyone registering who SHOULD be on the site uses the correct selection.
These spammers are not bots. We have plenty of bot protection. I've noticed they're mainly form china. A good way would be to ban all Chinese addresses but we do have a chinese member and may get more.
Essentially, I need something like:
if (field7 == "String")
ban_user($userid)
but obviously changed to work with vB and to run when the user registers their account.
Cheers
So anyway, I want to ban a user if a certain string is in a custom user field.
I'd like to have the user banned right away. How would I go about doing this?
I don't want to simply stop them registering, I want to let them register and ban them instantly.
I was going to use a cron job for this, but it wouldn't work out.
The reason for this is that Spammers keep registering on our site and leaving a certain drop down box on it's default setting, so we added a new default value for that drop down box and the spammers are now using that where-as anyone registering who SHOULD be on the site uses the correct selection.
These spammers are not bots. We have plenty of bot protection. I've noticed they're mainly form china. A good way would be to ban all Chinese addresses but we do have a chinese member and may get more.
Essentially, I need something like:
if (field7 == "String")
ban_user($userid)
but obviously changed to work with vB and to run when the user registers their account.
Cheers