Commit d92d5c5a authored by Haralan Dobrev's avatar Haralan Dobrev

Fix Security provider context usage

Fixes https://github.com/silexphp/Silex/issues/1568
parent eb559d4c
...@@ -230,12 +230,12 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener ...@@ -230,12 +230,12 @@ class SecurityServiceProvider implements ServiceProviderInterface, EventListener
$listeners = ['security.channel_listener']; $listeners = ['security.channel_listener'];
if ($protected) { if ($protected) {
if (!isset($app['security.context_listener.'.$name])) { if (!isset($app['security.context_listener.'.$context])) {
if (!isset($app['security.user_provider.'.$name])) { if (!isset($app['security.user_provider.'.$name])) {
$app['security.user_provider.'.$name] = is_array($users) ? $app['security.user_provider.inmemory._proto']($users) : $users; $app['security.user_provider.'.$name] = is_array($users) ? $app['security.user_provider.inmemory._proto']($users) : $users;
} }
$app['security.context_listener.'.$name] = $app['security.context_listener._proto']($name, [$app['security.user_provider.'.$name]]); $app['security.context_listener.'.$context] = $app['security.context_listener._proto']($name, [$app['security.user_provider.'.$name]]);
} }
if (false === $stateless) { if (false === $stateless) {
......
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