Author |
Message |
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Wed Jun 01, 2011 5:27 am Post subject: Disallow emailaddresses |
|
|
Hi there!
As far as I know it is only possible to BAN emailadresses.
But I would love to disallow emailaddresses, like for usernames.
I have some users with aol-addresses already, they are old and they are ok.
Now I want to block aol-addresses for NEW registrations.
But if I BAN the addresses it also affects the existing users.
Has anyboday an idea?
/Holger _________________ Love your data! Back it up! |
|
Back to top |
|
|
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Wed Jun 01, 2011 12:16 pm Post subject: Re: Disallow emailaddresses |
|
|
You're probably going to have to modify validate_email() in includes/functions_validate.php (line 116). It seems to be used only by the registration process, so you should be able to have fun with it without impacting other parts of the software.
I can't look into it fully, but you can probably hardcode your "banned" e-mails into the function by copying lines 132 to 137 and replacing the SQL stuff with your banned string ($row['ban_email'] - make sure you input it in the same format as the regular banned e-mails). You can also input a different error message if you like (instead of $lang['Email_banned']). |
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Fri Jun 03, 2011 3:17 am Post subject: Re: Disallow emailaddresses |
|
|
Very good idea! I will look into that!
Thank you! _________________ Love your data! Back it up! |
|
Back to top |
|
|
Jim_UK Board Member
Joined: 19 Nov 2008
Posts: 656 Location: North West UK
|
Posted: Thu Jun 09, 2011 4:47 pm Post subject: Re: Disallow emailaddresses |
|
|
Holger wrote: |
I have some users with aol-addresses already, they are old and they are ok.
Now I want to block aol-addresses for NEW registrations.
But if I BAN the addresses it also affects the existing users.
|
Are you sure about that Holger?
I have put a ban on gmail and certain other email addresses but it has no effect on those that had already registered. In fact if someone contacts me and says that they only have a particular already banned address then I un-ban it - wait for them to register and then re-ban it.
All mail functions still work for them so I do not see what your problem is.
Jim |
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Fri Jun 10, 2011 5:28 am Post subject: Re: Disallow emailaddresses |
|
|
But I want to ban *@aol.com for example ... I think that will affect already registered users also. _________________ Love your data! Back it up! |
|
Back to top |
|
|
Jim_UK Board Member
Joined: 19 Nov 2008
Posts: 656 Location: North West UK
|
Posted: Fri Jun 10, 2011 10:06 am Post subject: Re: Disallow emailaddresses |
|
|
Holger wrote: | But I want to ban *@aol.com for example ... I think that will affect already registered users also. |
No it will not effect them. I have *@aol.com plus others and it has no effect on those already registered and using those email addresses.
If someone has no other but a disallowed one and if you know them you can take off the disallow and then put it back when they have registered. Their mail system will work just fine.
Jim |
|
Back to top |
|
|
dogs and things Board Member
Joined: 18 Nov 2008
Posts: 628 Location: Spain
|
Posted: Fri Jun 10, 2011 12:15 pm Post subject: Re: Disallow emailaddresses |
|
|
Registered users will have a problem when they edit their profile, they will have to use a different email address. _________________ phpBB2 will never die, I hope! |
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Wed Jun 15, 2011 5:17 am Post subject: Re: Disallow emailaddresses |
|
|
Ok! Thanks a lot guys! _________________ Love your data! Back it up! |
|
Back to top |
|
|
|