You are here

function acl_add_user in ACL 6

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

Add the specified UID to an ACL.

File

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

Code

function acl_add_user($acl_id, $uid) {
  $test_uid = db_result(db_query("SELECT uid FROM {acl_user} WHERE acl_id = %d AND uid = %d ", $acl_id, $uid));
  if (!$test_uid) {
    db_query("INSERT INTO {acl_user} (acl_id, uid) VALUES (%d, %d)", $acl_id, $uid);
  }
}