Skip to content

Commit

Permalink
Reverting PR #51.
Browse files Browse the repository at this point in the history
We should try to switch to filter_var in 2.x
  • Loading branch information
halfdan committed Apr 22, 2013
1 parent 45fa8a5 commit b84e9c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/Piwik.php
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ static public function createAccessObject()
*/
static public function isValidEmailString($email)
{
return (preg_match("/^[a-zA-Z0-9_.+'-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]{2,7}$/D", $email) > 0);
return (preg_match('/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]{2,7}$/D', $email) > 0);
}

/**
Expand Down
1 change: 1 addition & 0 deletions tests/PHPUnit/Plugins/UsersManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public function testAddUserWrongPassword($userLogin, $password, $email, $alias)
public function getWrongEmailTestData()
{
return array(
array("geggeqgeqag", "geqgeagae", "ema'[email protected]", "alias"),
array("geggeqgeqag", "geqgeagae", "@email.com", "alias"),
array("geggeqgeqag", "geqgeagae", "[email protected]", "alias"),
array("geggeqgeqag", "geqgeagae", "email@4.", "alias"),
Expand Down

0 comments on commit b84e9c8

Please sign in to comment.