The expression $user->isEmailAddressVerified() of type boolean|null is loosely compared to false; this is ambiguous if the boolean can be false. You might want to explicitly use !== null instead.
If an expression can have both false, and null as possible values. It
is generally a good practice to always use strict comparison to clearly
distinguish between those two values.
$a=canBeFalseAndNull();// Instead ofif(!$a){}// Better use one of the explicit versions:if($a!==null){}if($a!==false){}if($a!==null&&$a!==false){}
Loading history...
42
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.');
43
}
44
}
45
46
public function checkPostAuth(UserInterface $user): void
If an expression can have both
false
, andnull
as possible values. It is generally a good practice to always use strict comparison to clearly distinguish between those two values.