includes/sessions.php
changeset 555 ac4c6a7f01d8
parent 554 e87390b1f9b0
child 556 63e131c38876
equal deleted inserted replaced
554:e87390b1f9b0 555:ac4c6a7f01d8
  1270                              . '    ON ( u.user_id=x.user_id OR x.user_id IS NULL )' . "\n"
  1270                              . '    ON ( u.user_id=x.user_id OR x.user_id IS NULL )' . "\n"
  1271                              . '  LEFT JOIN '.table_prefix.'privmsgs AS p' . "\n"
  1271                              . '  LEFT JOIN '.table_prefix.'privmsgs AS p' . "\n"
  1272                              . '    ON ( p.message_to=u.username AND p.message_read=0 )' . "\n"
  1272                              . '    ON ( p.message_to=u.username AND p.message_read=0 )' . "\n"
  1273                              . '  WHERE k.session_key=\''.$keyhash.'\'' . "\n"
  1273                              . '  WHERE k.session_key=\''.$keyhash.'\'' . "\n"
  1274                              . '    AND k.salt=\''.$salt.'\'' . "\n"
  1274                              . '    AND k.salt=\''.$salt.'\'' . "\n"
  1275                              . '  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;');
  1275                              . '  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, x.disable_js_fx;');
  1276     
  1276     
  1277     if ( !$query )
  1277     if ( !$query )
  1278     {
  1278     {
  1279       $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
  1279       $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
  1280                              LEFT JOIN '.table_prefix.'users AS u
  1280                              LEFT JOIN '.table_prefix.'users AS u
  1341     {
  1341     {
  1342       $this->sql('UPDATE '.table_prefix.'session_keys SET time='.time().' WHERE session_key=\''.$keyhash.'\';');
  1342       $this->sql('UPDATE '.table_prefix.'session_keys SET time='.time().' WHERE session_key=\''.$keyhash.'\';');
  1343     }
  1343     }
  1344     
  1344     
  1345     $user_extra = array();
  1345     $user_extra = array();
  1346     foreach ( array('user_aim', 'user_yahoo', 'user_msn', 'user_xmpp', 'user_homepage', 'user_location', 'user_job', 'user_hobbies', 'email_public') as $column )
  1346     foreach ( array('user_aim', 'user_yahoo', 'user_msn', 'user_xmpp', 'user_homepage', 'user_location', 'user_job', 'user_hobbies', 'email_public', 'disable_js_fx') as $column )
  1347     {
  1347     {
  1348       if ( isset($row[$column]) )
  1348       if ( isset($row[$column]) )
  1349         $user_extra[$column] = $row[$column];
  1349         $user_extra[$column] = $row[$column];
  1350     }
  1350     }
  1351     
  1351