1
1
Fork 0

for corp and edu sites, allow registration only to certain email addrs

This commit is contained in:
Mike Macgirvin 2010-09-23 15:36:21 -07:00
commit 4c2fbc81a0
2 changed files with 36 additions and 0 deletions

View file

@ -65,6 +65,12 @@ function register_post(&$a) {
dbesc($email)
);
if(!eregi('[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\.[A-Za-z]{2,6}',$email))
$err .= t(' Not valid email.');
if(! allowed_email($email))
$err .= t(' Your email domain is not among those allowed on this site.');
if($r !== false && count($r))
$err .= t(' Your email address is already registered on this system.') ;