Switch all $this->getRequest()->attributes->get('_account'); to current_user service.
Part of #2073531: Use current user service instead of _account, remove _account from the request object

Comments

m1r1k’s picture

Status: Active » Needs review
StatusFileSize
new480 bytes

Here is a patch:

m1r1k’s picture

Issue summary: View changes

Updated issue summary. Add parent task

alansaviolobo’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

this has already been implemented as

 protected function currentUser() {
    return \Drupal::currentUser();
  }

and

  public static function currentUser() {
    return static::$container->get('current_user');
  }