acl_node_add_acl

Versions
5
acl_node_add_acl($nid, $acl_id, $view, $update, $delete)
6 – 7
acl_node_add_acl($nid, $acl_id, $view, $update, $delete, $priority = 0)

Provide access control to a node based upon an ACL id.

Code

contributions/acl/acl.module, line 173

<?php
function acl_node_add_acl($nid, $acl_id, $view, $update, $delete) {
  db_query("DELETE FROM {acl_node} WHERE acl_id = %d AND nid = %d", $acl_id, $nid);
  db_query("INSERT INTO {acl_node} (acl_id, nid, grant_view, grant_update, grant_delete) VALUES (%d, %d, %d, %d, %d)", $acl_id, $nid, $view, $update, $delete);
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.