You are here

function protected_node_form_node_form_alter in Protected Node 7

Same name and namespace in other branches
  1. 1.0.x protected_node.module \protected_node_form_node_form_alter()

Implements hook_form_FORM_ID_alter().

Add the protected node form fieldset if the user editing has permission to edit this node type password.

File

./protected_node.module, line 530
Protected Node module.

Code

function protected_node_form_node_form_alter(&$form, &$form_state, $form_id) {
  if (user_access('edit any protected node password') || user_access('edit ' . $form['type']['#value'] . ' password')) {
    form_load_include($form_state, 'settings.inc', 'protected_node');
    protected_node_node_form_alter($form);
  }
}