private function AccessCheck::isTermAllowedByUserId in Permissions by Term 8
Same name and namespace in other branches
- 8.2 src/Service/AccessCheck.php \Drupal\permissions_by_term\Service\AccessCheck::isTermAllowedByUserId()
Parameters
int $tid:
int $iUid:
string $langcode:
Return value
bool
1 call to AccessCheck::isTermAllowedByUserId()
- AccessCheck::isAccessAllowedByDatabase in src/
Service/ AccessCheck.php
File
- src/
Service/ AccessCheck.php, line 140
Class
- AccessCheck
- AccessCheckService class.
Namespace
Drupal\permissions_by_term\ServiceCode
private function isTermAllowedByUserId($tid, $iUid, $langcode) {
$query_result = $this->database
->query("SELECT uid FROM {permissions_by_term_user} WHERE tid = :tid AND uid = :uid AND langcode = :langcode", [
':tid' => $tid,
':uid' => $iUid,
':langcode' => $langcode,
])
->fetchField();
if (!empty($query_result)) {
return TRUE;
}
else {
return FALSE;
}
}