You are here

function _protected_pages_settings_submit in Protected Pages 7

Same name and namespace in other branches
  1. 7.2 protected_pages.admin.inc \_protected_pages_settings_submit()

Custom submit function encrypt password and deleting non-useful variable.

1 string reference to '_protected_pages_settings_submit'
protected_pages_settings in ./protected_pages.admin.inc
Callback function for protected pages settings.

File

./protected_pages.admin.inc, line 497
Provides page callbacks for configuration page.

Code

function _protected_pages_settings_submit($form, &$form_state) {
  $passwd = $form_state['values']['protected_pages_global_password_field'];
  if ($passwd) {
    variable_set('protected_pages_global_password', sha1($passwd));
    unset($form_state['values']['protected_pages_global_password_field']);
    variable_del('protected_pages_global_password_field');
  }
}