Commit fd59f5a1 authored by Steven Wittens's avatar Steven Wittens
Browse files

- Added missing 'return' statement which broke username verification.

parent 9062b566
...@@ -169,7 +169,7 @@ function user_validate_name($name) { ...@@ -169,7 +169,7 @@ function user_validate_name($name) {
if (ereg(" \$", $name)) return t("The Username cannot end with a space."); if (ereg(" \$", $name)) return t("The Username cannot end with a space.");
if (ereg(" ", $name)) return t("The Username cannot contain multiple spaces in a row."); if (ereg(" ", $name)) return t("The Username cannot contain multiple spaces in a row.");
// if (ereg("[^a-zA-Z0-9@-@]", $name)) return t("The Username contains an illegal character."); // if (ereg("[^a-zA-Z0-9@-@]", $name)) return t("The Username contains an illegal character.");
if (!ereg('^[a-z0-9]+(@[a-z0-9]+)?$', $name)) t("The name contains an illegal character."); if (!ereg('^[a-z0-9]+(@[a-z0-9]+)?$', $name)) return t("The name contains an illegal character.");
if (strlen($name) > 56) return t("The Username '$name' is too long: it must be less than 56 characters."); if (strlen($name) > 56) return t("The Username '$name' is too long: it must be less than 56 characters.");
} }
......
...@@ -169,7 +169,7 @@ function user_validate_name($name) { ...@@ -169,7 +169,7 @@ function user_validate_name($name) {
if (ereg(" \$", $name)) return t("The Username cannot end with a space."); if (ereg(" \$", $name)) return t("The Username cannot end with a space.");
if (ereg(" ", $name)) return t("The Username cannot contain multiple spaces in a row."); if (ereg(" ", $name)) return t("The Username cannot contain multiple spaces in a row.");
// if (ereg("[^a-zA-Z0-9@-@]", $name)) return t("The Username contains an illegal character."); // if (ereg("[^a-zA-Z0-9@-@]", $name)) return t("The Username contains an illegal character.");
if (!ereg('^[a-z0-9]+(@[a-z0-9]+)?$', $name)) t("The name contains an illegal character."); if (!ereg('^[a-z0-9]+(@[a-z0-9]+)?$', $name)) return t("The name contains an illegal character.");
if (strlen($name) > 56) return t("The Username '$name' is too long: it must be less than 56 characters."); if (strlen($name) > 56) return t("The Username '$name' is too long: it must be less than 56 characters.");
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment