1199 } |
1199 } |
1200 $keyhash = md5($key); |
1200 $keyhash = md5($key); |
1201 $salt = $db->escape($keydata[3]); |
1201 $salt = $db->escape($keydata[3]); |
1202 // using a normal call to $db->sql_query to avoid failing on errors here |
1202 // using a normal call to $db->sql_query to avoid failing on errors here |
1203 $query = $db->sql_query('SELECT u.user_id AS uid,u.username,u.password,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,' . "\n" |
1203 $query = $db->sql_query('SELECT u.user_id AS uid,u.username,u.password,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,' . "\n" |
1204 . ' u.reg_time,u.account_active,u.activation_key,k.source_ip,k.time,k.auth_level,COUNT(p.message_id) AS num_pms,' . "\n" |
1204 . ' u.reg_time,u.account_active,u.activation_key,u.user_lang,k.source_ip,k.time,k.auth_level,COUNT(p.message_id) AS num_pms,' . "\n" |
1205 . ' x.* FROM '.table_prefix.'session_keys AS k' . "\n" |
1205 . ' x.* FROM '.table_prefix.'session_keys AS k' . "\n" |
1206 . ' LEFT JOIN '.table_prefix.'users AS u' . "\n" |
1206 . ' LEFT JOIN '.table_prefix.'users AS u' . "\n" |
1207 . ' ON ( u.user_id=k.user_id )' . "\n" |
1207 . ' ON ( u.user_id=k.user_id )' . "\n" |
1208 . ' LEFT JOIN '.table_prefix.'users_extra AS x' . "\n" |
1208 . ' LEFT JOIN '.table_prefix.'users_extra AS x' . "\n" |
1209 . ' ON ( u.user_id=x.user_id OR x.user_id IS NULL )' . "\n" |
1209 . ' ON ( u.user_id=x.user_id OR x.user_id IS NULL )' . "\n" |
1210 . ' LEFT JOIN '.table_prefix.'privmsgs AS p' . "\n" |
1210 . ' LEFT JOIN '.table_prefix.'privmsgs AS p' . "\n" |
1211 . ' ON ( p.message_to=u.username AND p.message_read=0 )' . "\n" |
1211 . ' ON ( p.message_to=u.username AND p.message_read=0 )' . "\n" |
1212 . ' WHERE k.session_key=\''.$keyhash.'\'' . "\n" |
1212 . ' WHERE k.session_key=\''.$keyhash.'\'' . "\n" |
1213 . ' AND k.salt=\''.$salt.'\'' . "\n" |
1213 . ' AND k.salt=\''.$salt.'\'' . "\n" |
1214 . ' GROUP BY u.user_id,u.username,u.password,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,u.reg_time,u.account_active,u.activation_key,k.source_ip,k.time,k.auth_level,x.user_id, x.user_aim, x.user_yahoo, x.user_msn, x.user_xmpp, x.user_homepage, x.user_location, x.user_job, x.user_hobbies, x.email_public;'); |
1214 . ' GROUP BY u.user_id,u.username,u.password,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,u.reg_time,u.account_active,u.activation_key,u.user_lang,k.source_ip,k.time,k.auth_level,x.user_id, x.user_aim, x.user_yahoo, x.user_msn, x.user_xmpp, x.user_homepage, x.user_location, x.user_job, x.user_hobbies, x.email_public;'); |
1215 |
1215 |
1216 if ( !$query ) |
1216 if ( !$query ) |
1217 { |
1217 { |
1218 $query = $this->sql('SELECT u.user_id AS uid,u.username,u.password,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,u.reg_time,u.account_active,u.activation_key,k.source_ip,k.time,k.auth_level,COUNT(p.message_id) AS num_pms FROM '.table_prefix.'session_keys AS k |
1218 $query = $this->sql('SELECT u.user_id AS uid,u.username,u.password,u.email,u.real_name,u.user_level,u.theme,u.style,u.signature,u.reg_time,u.account_active,u.activation_key,k.source_ip,k.time,k.auth_level,COUNT(p.message_id) AS num_pms FROM '.table_prefix.'session_keys AS k |
1219 LEFT JOIN '.table_prefix.'users AS u |
1219 LEFT JOIN '.table_prefix.'users AS u |