You are here

function acl_has_user in ACL 7

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

Determine whether an ACL has a specific assigned user.

File

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

Code

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