You are here

function acl_has_users in ACL 7

Same name and namespace in other branches
  1. 8 acl.module \acl_has_users()
  2. 5 acl.module \acl_has_users()
  3. 6 acl.module \acl_has_users()

Determine whether an ACL has some assigned users.

1 call to acl_has_users()
acl_node_access_records in ./acl.module
Implements hook_node_access_records().

File

./acl.module, line 210
An API module providing by-user access control lists.

Code

function acl_has_users($acl_id) {
  return db_query("SELECT COUNT(uid) FROM {acl_user} WHERE acl_id = :acl_id", array(
    'acl_id' => $acl_id,
  ))
    ->fetchField();
}