X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fnickname_functions.php;h=f66ade8e1c0227a7d578b3ef5ac1cbbfa4fa0b92;hb=596c8ab32594401ca84abfbfe35513ddfff31bec;hp=f3ec02b214696c2abdf77c88c4ea8a795a091ac5;hpb=c4823d28fd0bd22250b16d73f2034f36fc54abda;p=mailer.git diff --git a/inc/libs/nickname_functions.php b/inc/libs/nickname_functions.php index f3ec02b214..f66ade8e1c 100644 --- a/inc/libs/nickname_functions.php +++ b/inc/libs/nickname_functions.php @@ -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