Format valid_email function in include/text
This commit is contained in:
parent
0afdf92ca1
commit
385a36138a
|
@ -1068,17 +1068,14 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside =
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if $x is a valid email string
|
* @brief Check for a valid email string
|
||||||
*
|
*
|
||||||
* @param string $x
|
* @param string $email_address
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function valid_email($x){
|
function valid_email($email_address)
|
||||||
|
{
|
||||||
/// @TODO Removed because Fabio told me so.
|
return preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/', $email_address);
|
||||||
//if (Config::get('system','disable_email_validation'))
|
|
||||||
// return true;
|
|
||||||
return preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/', $x);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue