function acl_add_user in ACL 5
Same name and namespace in other branches
- 8 acl.module \acl_add_user()
- 6 acl.module \acl_add_user()
- 7 acl.module \acl_add_user()
Add the specified UID to an ACL.
File
- ./
acl.module, line 33 - acl.module
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);
}
}