diff --git a/core/core.services.yml b/core/core.services.yml index dbaf1e1..42f94a2 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -776,8 +776,7 @@ services: - { name: event_subscriber } arguments: ['@authentication'] current_user: - class: Drupal\Core\Session\AccountProxy - arguments: ['@authentication', '@request'] + class: Drupal\Core\Session\AnonymousUserSession session_manager: class: Drupal\Core\Session\SessionManager arguments: ['@request_stack', '@database', '@session_manager.metadata_bag', '@settings'] diff --git a/core/modules/user/lib/Drupal/user/UserServiceProvider.php b/core/modules/user/lib/Drupal/user/UserServiceProvider.php new file mode 100644 index 0000000..d4bfb11 --- /dev/null +++ b/core/modules/user/lib/Drupal/user/UserServiceProvider.php @@ -0,0 +1,29 @@ +getDefinition('current_user') + ->setClass('Drupal\Core\Session\AccountProxy') + ->setArguments(array(new Reference('authentication'), new Reference('request'))); + } + +}