function _protected_node_admin_settings_submit in Protected Node 6
Same name and namespace in other branches
- 7 protected_node.settings.inc \_protected_node_admin_settings_submit()
- 1.0.x protected_node.settings.inc \_protected_node_admin_settings_submit()
Submitting the form requires a little bit of work for the password. We need to encrypt it.
1 string reference to '_protected_node_admin_settings_submit'
- protected_node_admin_settings in ./
protected_node.settings.inc - Define the settings form
File
- ./
protected_node.settings.inc, line 570 - Configuration file for the protected_node module.
Code
function _protected_node_admin_settings_submit($form, &$form_state) {
$passwd = $form_state['values']['protected_node_global_password_field'];
if ($passwd) {
variable_set('protected_node_global_password', sha1($passwd));
unset($form_state['values']['protected_node_global_password_field']);
variable_del('protected_node_global_password_field');
}
// never reset the password...
}