- // Check login data
- $password = ""; $uid2 = ""; $dmy = ""; $online = 0; $login = 0;
- if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID($uid))) {
- // Nickname entered
- $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' AND status='CONFIRMED' LIMIT 1",
- array($uid), __FILE__, __LINE__);
- list($uid2, $password, $online, $login) = SQL_FETCHROW($result);
- if (!empty($uid2)) $uid = bigintval($uid2);
- } else {
- // Direct userid entered
- $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
- array($uid, $hash), __FILE__, __LINE__);
- list($uid2, $password, $online, $login) = SQL_FETCHROW($result);
- }
-
- // Is there an entry?
- if ((SQL_NUMROWS($result) == 1) && ((($probe_nickname) && (!empty($uid2))) || ($uid2 == $uid))) {
- // Free result
- SQL_FREERESULT($result);
-
- // By default the hash is empty
- $hash = "";
-
- // Check for old MD5 passwords
- if ((strlen($password) == 32) && (md5($passwd) == $password)) {
- // Just set the hash to the password from DB... :)
- $hash = $password;
+ // Init array
+ $content = array(
+ 'password' => '',
+ 'userid' => '',
+ 'last_online' => 0,
+ 'last_login' => 0,
+ 'hash' => ''
+ );
+
+ // Check login data
+ 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__);