This commit is contained in:
Robert Korulczyk 2024-05-16 19:53:55 -05:00 committed by GitHub
commit 2436480660
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 16 deletions

View file

@ -157,7 +157,8 @@ abstract class captcha_abstract
FROM ' . CONFIRM_TABLE . ' c FROM ' . CONFIRM_TABLE . ' c
LEFT JOIN ' . SESSIONS_TABLE . ' s ON (c.session_id = s.session_id) LEFT JOIN ' . SESSIONS_TABLE . ' s ON (c.session_id = s.session_id)
WHERE s.session_id IS NULL' . WHERE s.session_id IS NULL' .
((empty($type)) ? '' : ' AND c.confirm_type = ' . (int) $type); ((empty($type)) ? '' : ' AND c.confirm_type = ' . (int) $type)
. ' LIMIT 100000';
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result)) if ($row = $db->sql_fetchrow($result))

View file

@ -805,6 +805,8 @@ class session
unset($cookie_expire); unset($cookie_expire);
if ($this->data['user_id'] != ANONYMOUS)
{
$sql = 'SELECT COUNT(session_id) AS sessions $sql = 'SELECT COUNT(session_id) AS sessions
FROM ' . SESSIONS_TABLE . ' FROM ' . SESSIONS_TABLE . '
WHERE session_user_id = ' . (int) $this->data['user_id'] . ' WHERE session_user_id = ' . (int) $this->data['user_id'] . '
@ -823,6 +825,7 @@ class session
$db->sql_query($sql); $db->sql_query($sql);
} }
} }
}
else else
{ {
$this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now; $this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now;