Forums | Mahara Community

Support /
Ban specific email providers


anonymous profile picture
Account deleted
Posts: 3

24 March 2014, 5:04

Looking for a way to ban specific email domains

 

I have been looking through the forums and the manual, but have not been able to find the answer:

Is there a way to block certain email providers? I would like to disallow emails from hotmail.

 I am using Mahara 1.8.1

Regards,

 

Klaus

24 March 2014, 6:15

Hello


There is not such feature in Mahara yet, as long as I know. But it is possible to limit the authentication of your users in using an external auth plugin such as LDAP for example. That way you are controlling the emails addresses of your users.

dajan
steve P's profile picture
Posts: 122

25 March 2014, 17:55

Klaus

If you are trying to prevent registration from users with @hotmail accounts, you could run a cron job that checks the database table usr_registration every couple of minutes. Anything with 'pending' = 1 and 'email' contains @hotmail should be deleted. 

Aaron Wells's profile picture
Posts: 896

26 March 2014, 12:04

If you don't mind patching core code, the way I'd do it is to add a check in the function auth_register_validate() in htdocs/auth/lib.php. Then you could make it so the user sees an error message that says "Sorry, we're not accepting registrations from that domain."

Cheers,

Aaron

4 results