]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/nickname_functions.php
Code style changed, ext-user continued:
[mailer.git] / inc / libs / nickname_functions.php
index f3ec02b214696c2abdf77c88c4ea8a795a091ac5..f66ade8e1c0227a7d578b3ef5ac1cbbfa4fa0b92 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -40,16 +40,16 @@ if (!defined('__SECURITY')) {
        die();
 } // END - if
 
-// Checks wether the nickname is active
+// Checks whether the nickname is active
 function isNicknameOrUserid ($useridNick) {
        // By default nothing is found...
-       $ret = false;
+       $ret = FALSE;
 
        // Found in cache?
        if (isset($GLOBALS['nickname_active'][$useridNick])) {
                // Use it directly
                $ret = $GLOBALS['nickname_active'][$useridNick];
-       } else {
+       } elseif ((!empty($useridNick)) && ($useridNick != '0')) {
                // Nickname or userid used?
                $nick = getNickname($useridNick);
 
@@ -75,10 +75,10 @@ function getNickname ($userid) {
                $ret = $GLOBALS['nicknames'][$userid];
        } else {
                // Init result
-               $result = false;
+               $result = FALSE;
 
                // Nickname or userid used?
-               if ('' . round($userid) . '' === '' . $userid . '') {
+               if ('' . bigintval($userid, TRUE, FALSE) . '' === '' . $userid . '') {
                        // Userid given, so try to load user data
                        if (fetchUserData($userid)) {
                                // Load nickname from database