[SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService

This commit is contained in:
Grégoire Pineau 2016-12-23 15:07:27 +01:00
parent eeb9192cf3
commit 8227593604
1 changed files with 2 additions and 1 deletions

View File

@ -96,7 +96,8 @@ class RememberMeFactory implements SecurityFactoryInterface
if (count($userProviders) === 0) {
throw new \RuntimeException('You must configure at least one remember-me aware listener (such as form-login) for each firewall that has remember-me enabled.');
}
$rememberMeServices->replaceArgument(0, $userProviders);
$rememberMeServices->replaceArgument(0, array_unique($userProviders));
// remember-me listener
$listenerId = 'security.authentication.listener.rememberme.'.$id;