mirror of
https://github.com/e107inc/e107.git
synced 2025-04-15 10:02:02 +02:00
Fixes #483 - email validation. check_email() now using PHP5 filter_var()
This commit is contained in:
parent
6d649de543
commit
977369ad84
11
class2.php
11
class2.php
@ -1270,8 +1270,15 @@ function js_location($qry)
|
||||
}
|
||||
|
||||
function check_email($email)
|
||||
{
|
||||
return preg_match("/^([_a-zA-Z0-9-+]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+)(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,6})$/" , $email) ? $email : false;
|
||||
{
|
||||
if(filter_var($email, FILTER_VALIDATE_EMAIL))
|
||||
{
|
||||
return $email;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
// return preg_match("/^([_a-zA-Z0-9-+]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+)(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,6})$/" , $email) ? $email : false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user