Commit 7e50b223 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Added check to make sure that uid does not already exist. This is

usually handled via uid cookie we get back from the browser, but if
the user Clicks stop or maybe has cookies off, we don't that info.
parent 40ada0ba
...@@ -413,6 +413,9 @@ if (! $returning) { ...@@ -413,6 +413,9 @@ if (! $returning) {
elseif (!TBvalid_uid($formfields[joining_uid])) { elseif (!TBvalid_uid($formfields[joining_uid])) {
$errors["UserName"] = TBFieldErrorString(); $errors["UserName"] = TBFieldErrorString();
} }
elseif (TBCurrentUser($formfields[joining_uid])) {
$errors["UserName"] = "Already in use. Pick another";
}
if (!isset($formfields[usr_title]) || if (!isset($formfields[usr_title]) ||
strcmp($formfields[usr_title], "") == 0) { strcmp($formfields[usr_title], "") == 0) {
$errors["Title/Position"] = "Missing Field"; $errors["Title/Position"] = "Missing Field";
......
...@@ -568,6 +568,9 @@ if (! $returning) { ...@@ -568,6 +568,9 @@ if (! $returning) {
elseif (!TBvalid_uid($formfields[proj_head_uid])) { elseif (!TBvalid_uid($formfields[proj_head_uid])) {
$errors["UserName"] = TBFieldErrorString(); $errors["UserName"] = TBFieldErrorString();
} }
elseif (TBCurrentUser($formfields[joining_uid])) {
$errors["UserName"] = "Already in use. Pick another";
}
if (!isset($formfields[usr_title]) || if (!isset($formfields[usr_title]) ||
strcmp($formfields[usr_title], "") == 0) { strcmp($formfields[usr_title], "") == 0) {
$errors["Title/Position"] = "Missing Field"; $errors["Title/Position"] = "Missing Field";
......
Supports Markdown
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