mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Stricter email address validation
Use PHP's filter extension to validate mail addresses. The filter extension is enabled by default as of PHP 5.2.0. Thanks-to: Florian Pritz <bluewind@xinu.at> Thanks-to: Cédric Girard <girard.cedric@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
2131d3cb8b
commit
e686b495a8
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ function check_sid() {
|
||||||
# verify that an email address looks like it is legitimate
|
# verify that an email address looks like it is legitimate
|
||||||
#
|
#
|
||||||
function valid_email($addy) {
|
function valid_email($addy) {
|
||||||
return strpos($addy, '@');
|
return (filter_var($addy, FILTER_VALIDATE_EMAIL) !== false);
|
||||||
}
|
}
|
||||||
|
|
||||||
# a new seed value for mt_srand()
|
# a new seed value for mt_srand()
|
||||||
|
|
Loading…
Add table
Reference in a new issue