Skip to content
Snippets Groups Projects
Commit a4668e2e authored by Peter Rotich's avatar Peter Rotich
Browse files

bug: $staff object can be called uninitialised

parent 8458d97a
No related branches found
No related tags found
No related merge requests found
......@@ -1006,8 +1006,9 @@ class PasswordResetTokenBackend extends StaffAuthenticationBackend {
return false;
elseif (!($_config = new Config('pwreset')))
return false;
elseif (($staff = StaffSession::lookup($_POST['userid'])) &&
!$staff->getId())
$staff = StaffSession::lookup($_POST['userid']);
if (!$staff || !$staff->getId())
$errors['msg'] = __('Invalid user-id given');
elseif (!($id = $_config->get($_POST['token']))
|| $id != $staff->getId())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment