X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fuser_functions.php;h=0737b412fd450bad2987e4d02073a19d157e4b14;hp=a861f8c0b7524ab3b3ef62c31778a97a3bc46cef;hb=03f62d0b89aa9276ac37f4d616d940fae184d850;hpb=5071030af40e69ca4284642f44758964e18f5be8 diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index a861f8c0b7..0737b412fd 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { function alpha ($sortby, $colspan, $return=false) { if (!REQUEST_ISSET_GET('offset')) REQUEST_SET_GET('offset', 0); $add = "&page=".REQUEST_GET('page')."&offset=".REQUEST_GET('offset'); - if (REQUEST_ISSET_GET(('mode'))) $add .= "&mode=".REQUEST_GET(('mode')); + if (REQUEST_ISSET_GET('mode')) $add .= "&mode=".REQUEST_GET('mode'); /* Creates the list of letters and makes them a link. */ $alphabet = explode(',', getMessage('_ALL2') . 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z' . getMessage('_OTHERS')); @@ -58,8 +58,8 @@ function alpha ($sortby, $colspan, $return=false) { $OUT .= "".$ltr.""; } else { // Output link to letter - $OUT .= "".$ltr.""; } @@ -94,7 +94,7 @@ function SortLinks ($letter, $sortby, $colspan, $return=false) { // Add status or mode if (REQUEST_ISSET_GET(('status'))) $add .= "&mode=".REQUEST_GET(('status')); - elseif (REQUEST_ISSET_GET(('mode'))) $add .= "&mode=".REQUEST_GET(('mode')); + elseif (REQUEST_ISSET_GET('mode')) $add .= "&mode=".REQUEST_GET('mode'); // Makes order by links.. if ($letter == "front") $letter = getMessage('_ALL2'); @@ -156,18 +156,18 @@ function ADD_PAGENAV ($PAGES, $offset, $show_form, $colspan,$return=false) { if (($page == REQUEST_GET('page')) || ((!REQUEST_ISSET_GET('page')) && ($page == '1'))) { $OUT .= "-"; } else { - if (!REQUEST_ISSET_GET(('letter'))) REQUEST_SET_GET('letter', getMessage('_ALL2')); - if (!REQUEST_ISSET_GET(('sortby'))) REQUEST_SET_GET('sortby', 'userid'); + if (!REQUEST_ISSET_GET('letter')) REQUEST_SET_GET('letter', getMessage('_ALL2')); + if (!REQUEST_ISSET_GET('sortby')) REQUEST_SET_GET('sortby', 'userid'); // Base link - $OUT .= ""; + $OUT .= "&letter=".REQUEST_GET('letter')."&sortby=".REQUEST_GET('sortby')."&page=".$page."&offset=".$offset."\">"; } $OUT .= $page; @@ -283,11 +283,11 @@ function USER_DO_LOGIN ($uid, $passwd) { if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($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__); + array($uid), __FUNCTION__, __LINE__); } else { // Direct userid entered $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1", - array($uid, $content['hash']), __FUNCTION__, __LINE__); + array($uid, $content['hash']), __FUNCTION__, __LINE__); } // Load entry @@ -295,7 +295,7 @@ function USER_DO_LOGIN ($uid, $passwd) { if (!empty($content['userid'])) $uid = bigintval($content['userid']); // Is there an entry? - if ((SQL_NUMROWS($result) == 1) && ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid))) { + if ((SQL_NUMROWS($result) == 1) && ((isNicknameUsed($content['userid'] === true) && (!empty($content['userid']))) || ($content['userid'] == $uid))) { // Free result SQL_FREERESULT($result); @@ -372,7 +372,7 @@ function USER_DO_LOGIN ($uid, $passwd) { // Wrong password! $URL = 'modules.php?module=index&what=login&login='.getCode('WRONG_PASS'); } - } elseif ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid)) { + } elseif (((isNicknameUsed($content['userid'])) && (!empty($content['userid']))) || ($content['userid'] == $uid)) { // Other account status? // @TODO Can this query be merged with above query? $result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",