auto-approval for certain email domains

17 years 8 months ago #19774 by Dumhead
Hi, is it possible for me to allow for automatic approval for registrations using a specified email domain? I manage a site for a company in which employees of all have company email addresses. Some employees may wish to register a non-company email address. But for security, I would like to screen email addresses if they do not come with the company domain.

Is that possible? I am a bit green when it comes to php code, so I don't know where to start. Any suggestions?

Please Log in to join the conversation.

17 years 8 months ago #19781 by woonydanny
Replied by woonydanny on topic Re:auto-approval for certain email domains
this is the joomla 1.0.10 code (taken from joomla.php, about line 2737)

[code:1]if ((trim($this->email == ""«»)) || (preg_match("/[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,4}/", $this->email )==false)) {[/code:1]

Now this is what joomla uses to see if emails are valid emails or not .

If you change this code as fallow you will have:

[code:1]if ((trim($this->email == ""«»)) || (preg_match("/[\w\.\-]+@hotmail.com/", $this->email )==false)) {[/code:1]

now only emails with domain hotmail.com are allowed (or seen as true correct email address)

that’s it….if u try register with an email different from the @hotmail.com it will ask you to input a valid email address.

Now in your case, it wont let other email addresses the opportunity to register.

I would like to know if there is a way to have more than 2 domain names able to register

Please Log in to join the conversation.

17 years 8 months ago #19797 by Dumhead
Replied by Dumhead on topic Re:auto-approval for certain email domains

Now in your case, it wont let other email addresses the opportunity to register.


Well... I still want other email address to be able to register... but only pending administrative approval. That is, I don't mind checking for the few employees who never use their company email and use a service like hotmail, gmail, or yahoo. I would just like for the company emails to be approved automatically and all others to be sent for admin approval.

Please Log in to join the conversation.

15 years 11 months ago #63445 by ehran
Replied by ehran on topic Re:auto-approval for certain email domains
Hi ,

I would very much be interested in a solution to this as I am in the same situation and would like to auto approve certain domain names but screen others...

Cheers
Ehran

Post edited by: ehran, at: 2008/05/22 13:40

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.549 seconds

Facebook Twitter LinkedIn