]> git.mxchange.org Git - mailer.git/commitdiff
Rewritten to use NICKNAME_IS_ACTIVE()
authorRoland Häder <roland@mxchange.org>
Mon, 17 Aug 2009 18:02:53 +0000 (18:02 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 17 Aug 2009 18:02:53 +0000 (18:02 +0000)
inc/libs/nickname_functions.php
inc/libs/user_functions.php
inc/modules/guest/what-login.php

index fc575fbf3f78209435f39585d312760155658736..c776c5fb50092588a4790f3368546f66883a7bb4 100644 (file)
@@ -81,7 +81,7 @@ function NICKNAME_GET_NICK ($userid) {
 
                // Increment cache counter
                incrementConfigEntry('cache_hits');
-       } elseif (NICKNAME_IS_ACTIVE($userid)) {
+       } else {
                // Init result
                $result = false;
 
@@ -113,10 +113,5 @@ function NICKNAME_GET_NICK ($userid) {
        return $ret;
 }
 
-// Simple wrapper function
-function NICKNAME_PROBE_ON_USERID ($uid) {
-       return (NICKNAME_GET_NICK($uid) != '');
-}
-
 //
 ?>
index 0737b412fd450bad2987e4d02073a19d157e4b14..5fc33f72a2d2a35df50ae38dc77133b73a7fec7b 100644 (file)
@@ -280,7 +280,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
                );
 
                // Check login data
-               if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($uid))) {
+               if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_IS_ACTIVE($uid))) {
                        // Nickname entered
                        $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND `status`='CONFIRMED' LIMIT 1",
                                array($uid), __FUNCTION__, __LINE__);
@@ -411,7 +411,7 @@ function USER_DO_NEW_PASSWORD ($email, $uid) {
        $result = false;
 
        // Probe userid/nickname
-       if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($uid))) {
+       if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_IS_ACTIVE($uid))) {
                // Nickname entered
                $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' OR email='%s' LIMIT 1",
                array($uid, $email), __FUNCTION__, __LINE__);
index f48373d62f062d148c5d60365ded7a6bb2a5f79c..6c103960240194df0970c83f74cbb26f11430cb7 100644 (file)
@@ -64,7 +64,7 @@ if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) {
        $uid = getUserId();
 } elseif ((REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST(('password'))) && (isFormSent())) {
        // Set userid and crypt password when login data was submitted
-       if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) {
+       if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_IS_ACTIVE(REQUEST_POST('id')))) {
                // Nickname entered
                $uid = SQL_ESCAPE(REQUEST_POST('id'));
        } else {