The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Ban user on registration is string matches?
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 |
#2
|
|||
|
|||
Someone asked something similar a while back - I think you could create a plugin using the hook location 'register_addmember_process', and make the code
PHP Code:
The call for that hook is in register.php around line 385. You can probably look at the code in there to figure out what the condition should be. (BTW, why is the thread title 'Database Queries'?) |
#3
|
|||
|
|||
I'll take a look at that later then. Thanks
as for the topic title. I was going to ask something else but figured it out myself and got stuck again but forgot to change the title. Tried to edit it but couldn't on my iPod so will try later when I get to a proper machine. |
#4
|
|||
|
|||
Largo. Please let us know if you make any headway on this. I for one would be GREATLY interested in such a hack. I'm constantly getting spammers who log in and post URLs in various profile fields.
I was originally looking for a method of denying URLs in those using a regular expression but so far I haven't been able to figure that one out. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|