function protected_node_enter_any_password_submit in Protected Node 6
Same name and namespace in other branches
- 7 protected_node.fork.inc \protected_node_enter_any_password_submit()
- 1.0.x protected_node.fork.inc \protected_node_enter_any_password_submit()
Allow the user to see this node.
File
- ./
protected_node.fork.inc, line 225 - Redirected page callback file for the protected_node module. This version supports any number of pages instead of a destination.
Code
function protected_node_enter_any_password_submit($form, &$form_state) {
// switch the session to the newly unlocked page
$nids = protected_node_password_nids();
$nid = $form_state['values']['protected_node_selected_nid'];
foreach ($nids as $n) {
if ($n == $nid) {
$_SESSION['_protected_node']['passwords'][$n] = time();
}
else {
unset($_SESSION['_protected_node']['passwords'][$n]);
}
}
drupal_goto('node/' . $nid);
}