Skip to content

Commit

Permalink
Return null if current user doesn't support password policy
Browse files Browse the repository at this point in the history
  • Loading branch information
lsimeonov committed Jul 26, 2018
1 parent 5b78f1d commit 36fc6e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/PasswordExpiryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private function getCurrentUser(): ?HasPasswordPolicyInterface
return null;
}

return $user;
return $user instanceof HasPasswordPolicyInterface ? $user : null;
}

return null;
Expand Down

0 comments on commit 36fc6e9

Please sign in to comment.