]> git.mxchange.org Git - mailer.git/commitdiff
Members can now no longer enter 'NULL' as their nickname
authorRoland Häder <roland@mxchange.org>
Fri, 29 Jul 2011 00:54:04 +0000 (00:54 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 29 Jul 2011 00:54:04 +0000 (00:54 +0000)
doubler.php
inc/modules/member/what-nickname.php
inc/wrapper-functions.php
templates/de/html/guest/guest_register_refid_hide.tpl

index e62f1583c35295ff873af81ca964afc5989d1664..99ab704236745fcaf8d8ffaae1765a2bb6c17ad8 100644 (file)
@@ -67,7 +67,7 @@ if (isFormSent()) {
        // 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 {
@@ -152,7 +152,7 @@ if (isFormSent()) {
                } 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 {
index f3b14852697918508469f2f206da05216ac90272..58c3db924ae01ba0e79b24e357952c9829745d40 100644 (file)
@@ -58,7 +58,7 @@ if (isFormSent()) {
                // 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
index fe44a0b7d115fa89fca574cef8f9d21b802b3414..548aa6562e45c79baa2cdfb4a4375515200bc0ff 100644 (file)
@@ -559,7 +559,7 @@ function isNicknameUsed ($userid) {
        // 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
index d12812bbaa32c3a7b22b0ef68fe579f48773a575..aa1eb38d8b4df222a15446e4f19dd0c82cabdc33 100644 (file)
@@ -4,6 +4,6 @@
        </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>