You are here

public function AccessStorage::getAllTermPermissionsByUserId in Permissions by Term 8.2

Get all term permissoins by user id.

Return value

array The list of terms for this user.

File

src/Service/AccessStorage.php, line 109

Class

AccessStorage
Class AccessStorage.

Namespace

Drupal\permissions_by_term\Service

Code

public function getAllTermPermissionsByUserId($uid) {
  $query = $this->database
    ->select('permissions_by_term_user', 'pu')
    ->condition('uid', $uid);
  $query
    ->addExpression("CONCAT(tid, ' ', uid, ' ', langcode)");
  return $query
    ->orderBy('tid')
    ->orderBy('uid')
    ->orderBy('langcode')
    ->execute()
    ->fetchCol(0);
}