Commit 2065bd6d authored by Fabien Potencier's avatar Fabien Potencier

bug #1641 Set new security.user_provider inside existing context (719media)

This PR was merged into the 2.3.x-dev branch.

Discussion
----------

Set new security.user_provider inside existing context

Set `$app['security.user_provider.'.$name]` even if the context already exists. See #1640

Commits
-------

a3b15453 Set `$app['security.user_provider.'.$name]`
parents 7fec6664 a3b15453
......@@ -237,11 +237,10 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
}
if ($protected) {
if (!isset($app['security.context_listener.'.$context])) {
if (!isset($app['security.user_provider.'.$name])) {
$app['security.user_provider.'.$name] = is_array($users) ? $app['security.user_provider.inmemory._proto']($users) : $users;
}
if (!isset($app['security.context_listener.'.$context])) {
$app['security.context_listener.'.$context] = $app['security.context_listener._proto']($name, [$app['security.user_provider.'.$name]]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment