Abhoryo 13 年之前
父節點
當前提交
e9d2a67c1f
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/Symfony/Component/Security/Core/User/ChainUserProvider.php

+ 4 - 3
src/Symfony/Component/Security/Core/User/ChainUserProvider.php

@@ -60,15 +60,16 @@ class ChainUserProvider implements UserProviderInterface
             } catch (UnsupportedUserException $unsupported) {
                 // try next one
             } catch (UsernameNotFoundException $notFound) {
-                // try next one
                 $supportedUserFound = true;
+                // try next one
             }
         }
         
-        if ($supportedUserFound)
+        if ($supportedUserFound) {
             throw new UsernameNotFoundException(sprintf('There is no user with name "%s".', $user->getUsername()));
-        else
+        } else {
             throw new UnsupportedUserException(sprintf('The account "%s" is not supported.', get_class($user)));
+        }
     }
 
     /**