Conditions | 5 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
30 | 4 | public function checkPreAuth(UserInterface $user): void |
|
31 | { |
||
32 | 4 | if (!$user instanceof AbstractUser) { |
|
33 | 1 | return; |
|
34 | } |
||
35 | |||
36 | 3 | if (!$user->isEnabled()) { |
|
37 | 1 | throw new DisabledException('This user is currently disabled'); |
|
38 | } |
||
39 | |||
40 | 2 | if ($this->denyUnverifiedLogin && !$user->isEmailAddressVerified()) { |
|
41 | 1 | throw new DisabledException('Please verify your email address before logging in. If you did not receive a confirmation email please try resetting your password using the forgot password feature.'); |
|
42 | } |
||
49 |