// Begin with doubling process
if ((isPostRequestParameterSet('userid')) && (isPostRequestParameterSet('password')) && (isPostRequestParameterSet('points'))) {
// Probe for nickname extension and if a nickname was entered
- if (isNickNameUsed(postRequestParameter('userid'))) {
+ if (isNicknameUsed(postRequestParameter('userid'))) {
// Nickname in URL, so load the id
fetchUserData(postRequestParameter('userid'), 'nickname');
} else {
} elseif (postRequestParameter('points') > getConfig('doubler_max')) {
// Too much points entered
$content['message'] = '{--DOUBLER_FORM_POINTS_MAX--}';
- } elseif (isNickNameUsed(postRequestParameter('userid'))) {
+ } elseif (isNicknameUsed(postRequestParameter('userid'))) {
// Cannot resolv nickname -> userid
$content['message'] = '{--DOUBLER_FORM_404_NICKNAME--}';
} else {
// Check if nickname is valid
if (preg_match('/[' . getConfig('nickname_pattern') . ']{' . getConfig('nickname_len') . ',}/', postRequestParameter('nickname'), $array)) {
// Entered nickname is valid?
- $isValid = ($array[0] == postRequestParameter('nickname'));
+ $isValid = (($array[0] == postRequestParameter('nickname')) && (isNicknameUsed(postRequestParameter('nickname'))));
} // END - if
} // END - if
} // END - if
// Is the cache there
if (!isset($GLOBALS[__FUNCTION__][$userid])) {
// Determine it
- $GLOBALS[__FUNCTION__][$userid] = ((!empty($userid)) && (('' . round($userid) . '') != $userid));
+ $GLOBALS[__FUNCTION__][$userid] = ((!empty($userid)) && (('' . round($userid) . '') != $userid) && ($userid != 'NULL'));
} // END - if
// Return the result
</td>
<td class="register_right">
<strong>{%pipe,determineReferalId%}</strong>
- <input type="hidden" name="refid" value="{%pipe,determineReferalId%}" />
+ <input type="hidden" name="refid" value="{%pipe,determineReferalId,makeZeroToNull%}" />
</td>
</tr>