You are here

function simple_access_form_alter in Simple Access 5

Same name and namespace in other branches
  1. 5.2 simple_access.module \simple_access_form_alter()
  2. 6.2 simple_access.module \simple_access_form_alter()

File

./simple_access.module, line 207
This module allows administrators to make nodes viewable by specific 'access groups'. Each access group can contain any number of roles. If a node is not assigned to any access groups, it will remain viewable by all users.

Code

function simple_access_form_alter($form_id, &$form) {

  // if this is a node form...
  if (isset($form['type']) && $form['type']['#value'] . '_node_form' == $form_id) {
    if ($simple_access_form = simple_access_form($form['#node'])) {
      $form = array_merge($form, $simple_access_form);
    }
  }
}