function protected_node_enter_any_password_submit in Protected Node 1.0.x
Same name and namespace in other branches
- 6 protected_node.fork.inc \protected_node_enter_any_password_submit()
- 7 protected_node.fork.inc \protected_node_enter_any_password_submit()
Submit callback.
Allow the user to see this node.
File
- ./
protected_node.fork.inc, line 210 - Redirected page callback file for the protected_node module.
Code
function protected_node_enter_any_password_submit($form, &$form_state) {
$nids = protected_node_get_nids_from_protected_pages_parameter();
$nid = $form_state['values']['protected_node_selected_nid'];
// Switch the session to the newly unlocked page.
foreach ($nids as $n) {
if ($n == $nid) {
$_SESSION['_protected_node']['passwords'][$n] = REQUEST_TIME;
}
else {
unset($_SESSION['_protected_node']['passwords'][$n]);
}
}
drupal_goto('node/' . $nid);
}