Skip to content

Commit

Permalink
ENH get cached Member in LoginSession (#152)
Browse files Browse the repository at this point in the history
calls to isCurrent do not benefit from cache when byID is used
  • Loading branch information
lekoala authored Jul 4, 2023
1 parent c7a59f2 commit ad7265d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/LoginSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static function getCurrentLoginSession(?HTTPRequest $request = null): ?se

$loginHandler = Injector::inst()->get(LogInAuthenticationHandler::class);
$loginSessionID = $request->getSession()->get($loginHandler->getSessionVariable());
$loginSession = LoginSession::get()->byID($loginSessionID);
$loginSession = LoginSession::get_by_id($loginSessionID);
return $loginSession;
}

Expand Down

0 comments on commit ad7265d

Please sign in to comment.