summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-27 14:34:18 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-27 14:34:18 +0200
commit6edf929449f50339c4cb52891426fa9d45e33e00 (patch)
tree963d70f006e24d34c62cebd27208e16c83a163a7 /system/helpers
parentb66664b5decd68de50ae6c239c8d995d6c088d94 (diff)
parentd37f0e9cfe106ff1a15b8f09df27e4f3a004b907 (diff)
Merge pull request #1319 from timw4mail/email
Make valid_email helper function more accurate
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/email_helper.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php
index 0516e938a..628667d4d 100644
--- a/system/helpers/email_helper.php
+++ b/system/helpers/email_helper.php
@@ -45,9 +45,9 @@ if ( ! function_exists('valid_email'))
* @param string
* @return bool
*/
- function valid_email($address)
+ function valid_email($email)
{
- return (bool) preg_match('/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix', $address);
+ return filter_var($email, FILTER_VALIDATE_EMAIL);
}
}