Commit fc1d587b authored by Leigh Stoller's avatar Leigh Stoller

Fix up ereg for phone numbers.

parent e4fe5f83
......@@ -390,7 +390,7 @@ if (! $returning) {
strcmp($formfields[usr_phone], "") == 0) {
$errors["Phone #"] = "Missing Field";
}
elseif (! ereg("^[\(]*[0-9][-\(\)0-9]+$", $formfields[usr_phone])) {
elseif (! ereg("^[\(]*[0-9][-\(\) 0-9ext]+$", $formfields[usr_phone])) {
$errors["Phone"] = "Invalid characters";
}
if (!isset($formfields[password1]) ||
......
......@@ -341,7 +341,7 @@ if (!isset($formfields[usr_phone]) ||
strcmp($formfields[usr_phone], "") == 0) {
$errors["Phone #"] = "Missing Field";
}
elseif (! ereg("^[\(]*[0-9][-\(\)0-9]+$", $formfields[usr_phone])) {
elseif (! ereg("^[\(]*[0-9][-\(\) 0-9ext]+$", $formfields[usr_phone])) {
$errors["Phone"] = "Invalid characters";
}
if (isset($formfields[password1]) &&
......@@ -454,7 +454,8 @@ DBQueryFatal("UPDATE users SET ".
"usr_addr=\"$usr_addr\", ".
"usr_phone=\"$usr_phone\", ".
"usr_title=\"$usr_title\", ".
"usr_affil=\"$usr_affil\" ".
"usr_affil=\"$usr_affil\", ".
"usr_modified=now() ".
"WHERE uid=\"$target_uid\"");
#
......
......@@ -534,7 +534,7 @@ if (! $returning) {
strcmp($formfields[usr_phone], "") == 0) {
$errors["Phone #"] = "Missing Field";
}
elseif (! ereg("^[\(]*[0-9][-\(\)0-9]+$", $formfields[usr_phone])) {
elseif (! ereg("^[\(]*[0-9][-\(\) 0-9ext]+$", $formfields[usr_phone])) {
$errors["Phone"] = "Invalid characters";
}
if (!isset($formfields[password1]) ||
......
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