PDA

View Full Version : How to Disable Strikes Email sent to Users


Infinite Guitar
03-26-2009, 08:44 PM
Hey folks,

We've been pretty heavily attacked by bots and spammers recently as they've been trying to login to our member's accounts. Our members are getting pretty annoyed with constantly getting the emails that say "Your account has been locked for 15 minutes because someone tried to enter with wrong password".

I know the Strikes system can be disabled, but I'd rather not resort to that. Instead, I'd rather keep the strikes system enabled, but simply disable the notification email that users get each time a bot messes with their account.

Can anyone advise as to how to disable that email?

Meestor_X
12-21-2010, 12:04 AM
I'm having the same problem. What I would like, though, is to have the e-mail sent to ME instead of the user so I can look into the attacks.
Did you ever figure out how to do this?

Alfa1
12-22-2010, 11:05 AM
Can you find the IPs used?

Meestor_X
12-22-2010, 03:46 PM
That's why I want the notification sent to me, so I can find the IP addresses and block them.

BirdOPrey5
12-23-2010, 01:47 AM
To send the email address to you in the file includes/functions_login.php find the line:
vbmail($user['email'], $subject, $message, true);
For me it's line 109, may be a little different in different versions of 3.x...

Change it to:
vbmail("youremail@domain.com", $subject, $message, true);

Change youremail@domain.com to your personal email address.

That should send it to you instead of the user.

To disable the email completely comment out the line like so:
// vbmail($user['email'], $subject, $message, true);

Meestor_X
12-23-2010, 06:53 AM
That's great!
I'd like to make it a little more generic, so how would I change $user['email'] to the administrator's e-mail? i.e. userid #1's e-mail as it's stored in the database? That way if I change my e-mail address I don't have to remember to fix this edit...

BirdOPrey5
12-23-2010, 12:47 PM
That's great!
I'd like to make it a little more generic, so how would I change $user['email'] to the administrator's e-mail? i.e. userid #1's e-mail as it's stored in the database? That way if I change my e-mail address I don't have to remember to fix this edit...

Doing that (email for userid 1) will require an extra query to the database... however you might be able to change it to the email address you entered in your vbulletin options for "webmaster's email"

I haven't tested this but try:


vbmail($vbulletin->options['webmasteremail'], $subject, $message, true);

Meestor_X
12-23-2010, 04:15 PM
Thank you very much!

I'll give this a try and see how it works.

-Andy.