summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-06-22 17:37:08 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-06-22 17:37:08 +0200
commitc15366c3f66fb41afaacd69d737ab70d63a8d518 (patch)
treebea4cea3a464d37e5203725bf019d1209c973f02 /web
parentf4c5081f929e0006ec6410b55f82800efc3e1f75 (diff)
downloadaur-c15366c3f66fb41afaacd69d737ab70d63a8d518.tar.gz
aur-c15366c3f66fb41afaacd69d737ab70d63a8d518.tar.xz
use valid_email() from codeigniter's email helper
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'web')
-rw-r--r--web/lib/aur.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index 4c2cc559..32501330 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -78,7 +78,7 @@ function check_sid() {
# verify that an email address looks like it is legitimate
#
function valid_email($addy) {
- return strpos($addy, '@');
+ return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $addy)) ? FALSE : TRUE;
}
# a new seed value for mt_srand()