includes/sessions.php
changeset 499 6b7fdd898ba3
parent 495 00f5cd31217a
child 504 bc8e0e9ee01d
equal deleted inserted replaced
498:a85af9c28355 499:6b7fdd898ba3
  1236                              . '    ON ( u.user_id=x.user_id OR x.user_id IS NULL )' . "\n"
  1236                              . '    ON ( u.user_id=x.user_id OR x.user_id IS NULL )' . "\n"
  1237                              . '  LEFT JOIN '.table_prefix.'privmsgs AS p' . "\n"
  1237                              . '  LEFT JOIN '.table_prefix.'privmsgs AS p' . "\n"
  1238                              . '    ON ( p.message_to=u.username AND p.message_read=0 )' . "\n"
  1238                              . '    ON ( p.message_to=u.username AND p.message_read=0 )' . "\n"
  1239                              . '  WHERE k.session_key=\''.$keyhash.'\'' . "\n"
  1239                              . '  WHERE k.session_key=\''.$keyhash.'\'' . "\n"
  1240                              . '    AND k.salt=\''.$salt.'\'' . "\n"
  1240                              . '    AND k.salt=\''.$salt.'\'' . "\n"
  1241                              . '  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;');
  1241                              . '  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,u.user_timezone,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;');
  1242     
  1242     
  1243     if ( !$query )
  1243     if ( !$query )
  1244     {
  1244     {
  1245       $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, 1440 AS user_timezone FROM '.table_prefix.'session_keys AS k
  1245       $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, 1440 AS user_timezone FROM '.table_prefix.'session_keys AS k
  1246                              LEFT JOIN '.table_prefix.'users AS u
  1246                              LEFT JOIN '.table_prefix.'users AS u