]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/nickname_functions.php
Mailer used in many places, we still need a good 'selling' title
[mailer.git] / inc / libs / nickname_functions.php
index 08a94a206db0b3c09245175f15e9fcf77cde5e7e..3d9ad3963b28d26143a84d5882013e3189b065da 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 06/25/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 06/25/2004 *
  * ================                             Last change: 06/25/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
@@ -80,21 +80,14 @@ function getNickname ($userid) {
 
                // Nickname or userid used?
                if (''.round($userid).'' === ''.$userid.'') {
-                       // Userid given
-                       $result = SQL_QUERY_ESC("SELECT `nickname`  FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` =%s LIMIT 1",
-                               array(bigintval($userid)), __FUNCTION__, __LINE__);
-
-                       // Found?
-                       if (SQL_NUMROWS($result) == 1) {
+                       // Userid given, so try to load user data
+                       if (fetchUserData($userid)) {
                                // Load nickname from database
-                               list($ret) = SQL_FETCHROW($result);
+                               $ret = getUserData('nickname');
 
                                // Put it in cche
                                $GLOBALS['nicknames'][$userid] = $ret;
                        } // END - if
-
-                       // Free result
-                       SQL_FREERESULT($result);
                } else {
                        // Direct nickname found!
                        $ret = $userid;