Skip to content

Commit

Permalink
Add method to get the list of session variables
Browse files Browse the repository at this point in the history
  • Loading branch information
BurntimeX committed Dec 20, 2023
1 parent a275a7c commit 95f935a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions wcfsetup/install/files/lib/system/session/SessionHandler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1390,4 +1390,16 @@ public function deleteUserSession(string $sessionID): void
$statement = WCF::getDB()->prepare($sql);
$statement->execute([$sessionID]);
}

/**
* Returns the session variables.
*
* @since 6.1
*/
public function getVariables(): array
{
$scope = $this->isACP ? 'acp' : 'frontend';

return $this->variables[$scope] ?? [];
}
}

0 comments on commit 95f935a

Please sign in to comment.