function acl_node_clear_acls in ACL 5
Same name and namespace in other branches
- 8 acl.module \acl_node_clear_acls()
- 6 acl.module \acl_node_clear_acls()
- 7 acl.module \acl_node_clear_acls()
Clear all of a module's ACL's from a node.
File
- ./
acl.module, line 189 - acl.module
Code
function acl_node_clear_acls($nid, $module) {
$result = db_query("SELECT acl_id FROM {acl} WHERE module = '%s'", $module);
while ($o = db_fetch_object($result)) {
$acls[] = $o->acl_id;
}
if ($acls) {
db_query("DELETE FROM {acl_node} WHERE nid = %d AND acl_id in (%s)", $nid, implode(',', $acls));
}
}