You are here

public function NodeAccess::isNodeOwner 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::isNodeOwner()

Parameters

$nid:

$uid:

Return value

bool

2 calls to NodeAccess::isNodeOwner()
NodeAccess::canUserDeleteNode in src/Service/NodeAccess.php
NodeAccess::canUserUpdateNode in src/Service/NodeAccess.php

File

src/Service/NodeAccess.php, line 201

Class

NodeAccess
Class NodeAccess

Namespace

Drupal\permissions_by_term\Service

Code

public function isNodeOwner($nid, $uid) {
  $node = $this->node
    ->load($nid);
  if (intval($node
    ->getOwnerId()) == intval($uid)) {
    return TRUE;
  }
  return FALSE;
}