accept any @local email addresses

This commit is contained in:
SJ 2012-07-27 10:01:28 +02:00
parent 2d828c2be7
commit 6ca80b72b0

View File

@ -121,7 +121,7 @@ function checkemail($email, $domains) {
function validemail($email = '') { function validemail($email = '') {
if($email == '') { return 0; } if($email == '') { return 0; }
if($email == 'admin@local') { return 1; } if(preg_match("/@local$/", $email)) { return 1; }
if(preg_match('/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,5})$/', $email)) { if(preg_match('/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,5})$/', $email)) {
return 1; return 1;