Skip to content
Snippets Groups Projects
Commit dfaca0d4 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Repair pwreset logins

parent c0f49c64
Branches
No related tags found
No related merge requests found
...@@ -365,16 +365,14 @@ abstract class StaffAuthenticationBackend extends AuthenticationBackend { ...@@ -365,16 +365,14 @@ abstract class StaffAuthenticationBackend extends AuthenticationBackend {
list($id, $auth) = explode(':', $_SESSION['_auth']['staff']['key']); list($id, $auth) = explode(':', $_SESSION['_auth']['staff']['key']);
if (!($bk=static::getBackend($id)) //get the backend if (!($bk=static::getBackend($id)) //get the backend
|| !$bk->supportsAuthentication() //Make sure it can authenticate
|| !($staff = $bk->validate($auth)) //Get AuthicatedUser || !($staff = $bk->validate($auth)) //Get AuthicatedUser
|| !($staff instanceof Staff) || !($staff instanceof Staff)
|| $staff->getId() != $_SESSION['_auth']['staff']['id'] // check ID || $staff->getId() != $_SESSION['_auth']['staff']['id'] // check ID
) )
return null; return null;
$staff->setAuthKey($_SESSION['_auth']['staff']['key']); $staff->setAuthKey($_SESSION['_auth']['staff']['key']);
return $staff; return $staff;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment