diff --git a/core/modules/editor/lib/Drupal/editor/Plugin/InPlaceEditor/Editor.php b/core/modules/editor/lib/Drupal/editor/Plugin/InPlaceEditor/Editor.php index 1a4981a..4763efe 100644 --- a/core/modules/editor/lib/Drupal/editor/Plugin/InPlaceEditor/Editor.php +++ b/core/modules/editor/lib/Drupal/editor/Plugin/InPlaceEditor/Editor.php @@ -68,9 +68,9 @@ protected function textFormatHasTransformationFilters($format_id) { * Implements \Drupal\edit\EditPluginInterface::getAttachments(). */ public function getAttachments() { - global $user; + $user = \Drupal::request()->attributes->get('_account'); - $user_format_ids = array_keys(filter_formats($user)); + $user_format_ids = array_keys(filter_formats($user)); $manager = \Drupal::service('plugin.manager.editor'); $definitions = $manager->getDefinitions();