浏览代码

[Security] reverted some changes from previous merge

Fabien Potencier 14 年之前
父节点
当前提交
9e0d6177cb

+ 1 - 1
src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php

@@ -80,7 +80,7 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
             return $authenticatedToken;
         } catch (UsernameNotFoundException $notFound) {
             if ($this->hideUserNotFoundExceptions) {
-                throw new BadCredentialsException(sprintf('Bad credentials for user "%s"', $username), 0, $notFound);
+                throw new BadCredentialsException('Bad credentials', 0, $notFound);
             }
 
             throw $notFound;

+ 1 - 4
src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php

@@ -221,10 +221,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
     private function onSuccess(GetResponseEvent $event, Request $request, TokenInterface $token)
     {
         if (null !== $this->logger) {
-            $this->logger->info(sprintf(
-                'User "%s" has been authenticated successfully',
-                $token->getUsername()
-            ));
+            $this->logger->info(sprintf('User "%s" has been authenticated successfully', $token->getUsername()));
         }
 
         $this->securityContext->setToken($token);