summaryrefslogtreecommitdiffstats
path: root/Core/Authentication/Provider/DaoAuthenticationProvider.php
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2015-06-18 18:14:27 +0200
committerNicolas Grekas <nicolas.grekas@gmail.com>2015-06-18 18:14:27 +0200
commite92b6d4fee8cb5a22a33230897153bf290b3c4c9 (patch)
tree7ff59492198b0edf2a11c7a856817068df8dbe94 /Core/Authentication/Provider/DaoAuthenticationProvider.php
parentbb80188e3b42a85f6c4ead17332098cab3f62aac (diff)
parentfd0b8b96fe220887ba93535742343df84078cd93 (diff)
downloadsymfony-security-e92b6d4fee8cb5a22a33230897153bf290b3c4c9.zip
symfony-security-e92b6d4fee8cb5a22a33230897153bf290b3c4c9.tar.gz
symfony-security-e92b6d4fee8cb5a22a33230897153bf290b3c4c9.tar.bz2
Merge branch '2.7' into 2.8
* 2.7: (36 commits) [DoctrineBridge] Bypass the db when no valid identifier is provided in ORMQueryBuilderLoader [Serializer] Fixed typo in comment [Form] Fixed: Filter non-integers when selecting entities by int ID Fix merge Fix merge Add test for HHVM FatalErrors [2.6][Debug] Fix fatal-errors handling on HHVM [Debug] Fix log level of stacked errors [VarDumper] Fix uninitialized id in HtmlDumper Fixed fluent interface [Console] Fix tests on Windows [2.7] Fix unsilenced deprecation notices [2.3][Debug] Fix fatal-errors handling on HHVM [Debug] fix debug class loader case test on windows Standardize the name of the exception variables [Debug+VarDumper] Fix handling of PHP7 exception/error model Do not trigger deprecation error in ResolveParameterPlaceHoldersPass [2.3] Static Code Analysis for Components Added a small Upgrade note regarding security.context added missing deprecation in CHANGELOG ... Conflicts: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig src/Symfony/Component/HttpKernel/Kernel.php
Diffstat (limited to 'Core/Authentication/Provider/DaoAuthenticationProvider.php')
-rw-r--r--Core/Authentication/Provider/DaoAuthenticationProvider.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/Core/Authentication/Provider/DaoAuthenticationProvider.php b/Core/Authentication/Provider/DaoAuthenticationProvider.php
index b7b4917..90cba25 100644
--- a/Core/Authentication/Provider/DaoAuthenticationProvider.php
+++ b/Core/Authentication/Provider/DaoAuthenticationProvider.php
@@ -87,13 +87,13 @@ class DaoAuthenticationProvider extends UserAuthenticationProvider
}
return $user;
- } catch (UsernameNotFoundException $notFound) {
- $notFound->setUsername($username);
- throw $notFound;
- } catch (\Exception $repositoryProblem) {
- $ex = new AuthenticationServiceException($repositoryProblem->getMessage(), 0, $repositoryProblem);
- $ex->setToken($token);
- throw $ex;
+ } catch (UsernameNotFoundException $e) {
+ $e->setUsername($username);
+ throw $e;
+ } catch (\Exception $e) {
+ $e = new AuthenticationServiceException($e->getMessage(), 0, $e);
+ $e->setToken($token);
+ throw $e;
}
}
}