function protected_node_enterpassword_submit in Protected Node 1.0.x
Same name and namespace in other branches
- 5 protected_node.module \protected_node_enterpassword_submit()
- 6 protected_node.redirect.inc \protected_node_enterpassword_submit()
- 7 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;
}
}