Skip to content

Commit

Permalink
1.19.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic committed Mar 6, 2023
1 parent ac61056 commit 032029d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/snippets/FormLister/plugin.userHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
$sid = $modx->sid = session_id();
$pageId = (int)$modx->documentIdentifier;
$uid = function_exists('app') ? $uid : -1 * $uid;
$q = $modx->db->query("REPLACE INTO {$modx->getFullTableName('active_users')} (`sid`, `internalKey`, `username`, `lasthit`, `action`, `id`) values('{$sid}', {$uid}, '{$_SESSION['webShortname']}', '{$modx->time}', 998, {$pageId})");
$name = $modx->db->escape($_SESSION['webShortname'] ?? '');
$q = $modx->db->query("REPLACE INTO {$modx->getFullTableName('active_users')} (`sid`, `internalKey`, `username`, `lasthit`, `action`, `id`) values('{$sid}', {$uid}, '{$name}', '{$modx->time}', 998, {$pageId})");
$modx->updateValidatedUserSession();
}
if (isset($_REQUEST[$logoutKey])) {
Expand Down

0 comments on commit 032029d

Please sign in to comment.