You are here

public function NodeAccess::getUserInstance in Permissions by Term 8

Same name and namespace in other branches
  1. 8.2 src/Service/NodeAccess.php \Drupal\permissions_by_term\Service\NodeAccess::getUserInstance()

Return value

User

5 calls to NodeAccess::getUserInstance()
NodeAccess::canDeleteOwnNode in src/Service/NodeAccess.php
NodeAccess::canUpdateOwnNode in src/Service/NodeAccess.php
NodeAccess::canUserBypassNodeAccess in src/Service/NodeAccess.php
NodeAccess::canUserDeleteNode in src/Service/NodeAccess.php
NodeAccess::canUserUpdateNode in src/Service/NodeAccess.php

File

src/Service/NodeAccess.php, line 261

Class

NodeAccess
Class NodeAccess

Namespace

Drupal\permissions_by_term\Service

Code

public function getUserInstance($uid) {
  if ($this
    ->getLoadedUid() !== $uid) {
    $user = $this->userEntityStorage
      ->load($uid);
    $this
      ->setUserInstance($user);
    return $user;
  }
  return $this->userInstance;
}