Skip to content

Commit

Permalink
MDL-83822 core_session: Init redis connection in get_session_by_sid
Browse files Browse the repository at this point in the history
  • Loading branch information
PhMemmel committed Nov 26, 2024
1 parent 269a8a8 commit ec338a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/classes/session/redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ public function write(string $id, string $data): bool {

#[\Override]
public function get_session_by_sid(string $sid): \stdClass {
$this->init_redis_if_required();
$keys = ["id", "state", "sid", "userid", "sessdata", "timecreated", "timemodified", "firstip", "lastip"];
$sessiondata = $this->connection->hmget($this->sessionkeyprefix . $sid, $keys);

Expand Down

0 comments on commit ec338a7

Please sign in to comment.