You are here

function private_set_private_action in Private 6

Same name and namespace in other branches
  1. 7.2 private.module \private_set_private_action()
  2. 7 private.module \private_set_private_action()

Implementation of a Drupal action.

File

./private.module, line 274
A tremendously simple access control module -- it allows users to mark individual nodes as private; users with 'access private content' perms can read these nodes, while others cannot.

Code

function private_set_private_action(&$node, $context = array()) {
  $node->private = TRUE;
  $nids = array(
    $node->nid,
  );
  private_node_mark_private($nids);
}