diff --git a/cookbook/security/custom_provider.rst b/cookbook/security/custom_provider.rst index 38227569e03..1361e64cbd0 100644 --- a/cookbook/security/custom_provider.rst +++ b/cookbook/security/custom_provider.rst @@ -135,9 +135,9 @@ Here's an example of how this might look:: // ... return new WebserviceUser($username, $password, $salt, $roles) - } else { - throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username)); } + + throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username)); } public function refreshUser(UserInterface $user)