Merge pull request #10834 from lekoala/patch-36

SessionAuthenticationHandler doesn't cache member query
This commit is contained in:
Guy Sartorelli 2023-08-03 11:54:50 +12:00 committed by GitHub
commit b90d606427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ namespace SilverStripe\Security\MemberAuthenticator;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Cookie;
use SilverStripe\ORM\DataObject;
use SilverStripe\Control\Director;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Security\AuthenticationHandler;
@ -59,7 +60,7 @@ class SessionAuthenticationHandler implements AuthenticationHandler
return null;
}
/** @var Member $member */
$member = Member::get()->byID($id);
$member = DataObject::get_by_id(Member::class, $id);
return $member;
}