Skip to content

Commit

Permalink
ENH Use interface defined method
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Feb 20, 2025
1 parent 3f9b6f2 commit c039417
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Authenticator/LoginHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,7 @@ protected function doPerformLogin(HTTPRequest $request, Member $member)
{
// Deactivate sudo mode that was activated in doLogin()
$service = $this->getSudoModeService();
// Check if the service has a deactivate method, because it is not defined on the interface
if (ClassInfo::hasMethod($service, 'deactivate')) {
call_user_func([$service, 'deactivate'], $this->getRequest()->getSession());
}
$service->deactivate($request->getSession());

// Load the previously stored data from session and perform the login using it...
$data = $request->getSession()->get(static::SESSION_KEY . '.additionalData') ?: [];
Expand Down

0 comments on commit c039417

Please sign in to comment.