function _protected_node_node_type_submit in Protected Node 6
Same name and namespace in other branches
- 7 protected_node.settings.inc \_protected_node_node_type_submit()
- 1.0.x protected_node.settings.inc \_protected_node_node_type_submit()
Do a little extra work on submission.
1 string reference to '_protected_node_node_type_submit'
- protected_node_node_type_form_alter in ./
protected_node.settings.inc - @brief Implementation of the hook_form_alter() for node types.
File
- ./
protected_node.settings.inc, line 754 - Configuration file for the protected_node module.
Code
function _protected_node_node_type_submit($form, &$form_state) {
// make doubly sure the unencrypted field doesn't get saved
// (it should already be removed in the validate() function.)
unset($form_state['values']['protected_node_node_type_password_field']);
// delete the current password_field variable if it exists
$node_type = trim($form_state['values']['type']);
variable_del('protected_node_node_type_password_field_' . $node_type);
if (!empty($form_state['values']['old_type'])) {
// delete the old password field variable if it exists
$old_node_type = $form_state['values']['old_type'];
variable_del('protected_node_node_type_password_field_' . $old_node_type);
}
}