comparison pages/register.inc.php @ 1014:87eda2e9023f

Back out the stValidateRequestUserData() parameter change, use separate function instead for checking for if e-mail is required.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Nov 2015 18:25:05 +0200
parents fd957c37fd80
children b7ebc845e740
comparison
equal deleted inserted replaced
1013:720078ca799e 1014:87eda2e9023f
154 " ".stGetFormHiddenInput("mode", "check")."\n". 154 " ".stGetFormHiddenInput("mode", "check")."\n".
155 " ".stGetFormHiddenInput("hash", $botCheckHash)."\n". 155 " ".stGetFormHiddenInput("hash", $botCheckHash)."\n".
156 " <table class=\"register\">\n"; 156 " <table class=\"register\">\n";
157 stPrintFormTextInput("Handle:", "(elite)", 20, SET_LEN_USERNAME, "name"); 157 stPrintFormTextInput("Handle:", "(elite)", 20, SET_LEN_USERNAME, "name");
158 stPrintFormTextInput("Group(s):", "(elite crew^supahmen)", 30, SET_LEN_GROUPS, "groups"); 158 stPrintFormTextInput("Group(s):", "(elite crew^supahmen)", 30, SET_LEN_GROUPS, "groups");
159 stPrintFormTextInput("E-mail:", "(to be informed of location etc)", 30, SET_LEN_EMAIL, "email"); 159 stPrintFormTextInput("E-mail:", stCheckRequireEmail() ? "(required)" : "", 30, SET_LEN_EMAIL, "email");
160 stPrintFormTextInput("Oneliner:", "(whatever)", 30, SET_LEN_ONELINER, "oneliner"); 160 stPrintFormTextInput("Oneliner:", "(whatever)", 30, SET_LEN_ONELINER, "oneliner");
161 stPrintFormTextInput(hashToCheckStr($botCheckHash)." = ", "(I.Q. / robot check". 161 stPrintFormTextInput(hashToCheckStr($botCheckHash)." = ", "(I.Q. / robot check".
162 //" [".hashToAnswer($botCheckHash)."]". 162 //" [".hashToAnswer($botCheckHash)."]".
163 ")", 20, 20, "botcheck", "autocomplete=\"off\""); 163 ")", 20, 20, "botcheck", "autocomplete=\"off\"");
164 echo 164 echo
175 // Check the registrant's details 175 // Check the registrant's details
176 // 176 //
177 stChkRequestItem("hash", $hash, 177 stChkRequestItem("hash", $hash,
178 array(CHK_GTEQ, VT_STR, 0, "Invalid data.")); 178 array(CHK_GTEQ, VT_STR, 0, "Invalid data."));
179 179
180 stValidateRequestUserData(FALSE, $requireEmail, FALSE); 180 stValidateRequestUserData(FALSE, FALSE);
181 181
182 $answer = stGetRequestItem("botcheck"); 182 $answer = stGetRequestItem("botcheck");
183 if (hashToAnswer($hash) != intval($answer)) 183 if (hashToAnswer($hash) != intval($answer))
184 stError("Incorrect answer to I.Q. / bot check."); 184 stError("Incorrect answer to I.Q. / bot check.");
185 185