eregi_replace('ereg', 'preg', 'inside/User.php');

This commit is contained in:
Paal Braathen committed 2013-10-17 15:33:44 +02:00
1 parent a8b47c001d
commit 6ead0cd6f6
1 file changed
+1 -1
+1 -1
View File
@@ -337,7 +337,7 @@ class User {
public function _validate() {
$valid = true;
if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $this->email)) {
if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $this->email)) {
notify("Ugyldig format på epostadresse.");
$valid = false;
}