1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

A few additional checks added to check_email().

This commit is contained in:
Cameron
2015-08-25 13:00:53 -07:00
parent 36ccfecf23
commit fde5ee8f31

View File

@@ -1364,6 +1364,17 @@ function js_location($qry)
function check_email($email) function check_email($email)
{ {
if(empty($email))
{
return false;
}
if(is_numeric(substr($email,-1))) // fix for eCaptcha accidently typed on wrong line.
{
return false;
}
if(filter_var($email, FILTER_VALIDATE_EMAIL)) if(filter_var($email, FILTER_VALIDATE_EMAIL))
{ {
return $email; return $email;