You are here

function protected_node_enterpassword_submit in Protected Node 7

Same name and namespace in other branches
  1. 5 protected_node.module \protected_node_enterpassword_submit()
  2. 6 protected_node.redirect.inc \protected_node_enterpassword_submit()
  3. 1.0.x protected_node.redirect.inc \protected_node_enterpassword_submit()

Allow the user to see this node.

File

./protected_node.redirect.inc, line 223
Redirected page callback file for the protected_node module.

Code

function protected_node_enterpassword_submit($form, &$form_state) {

  // @todo The protected_node_nid parameter should be extracted from the
  // destination URI.
  if (isset($_SESSION['has_entered_global_password'])) {
    $_SESSION['_protected_node']['passwords']['global'] = REQUEST_TIME;
  }
  else {
    $_SESSION['_protected_node']['passwords'][$form_state['values']['protected_node_nid']] = REQUEST_TIME;
  }
}