function ldapauth_admin_options_submit in LDAP integration 5.2
Same name and namespace in other branches
- 5 ldapauth.module \ldapauth_admin_options_submit()
File
- ./
ldapauth.module, line 307
Code
function ldapauth_admin_options_submit($form_id, $form_values) {
if ($form_values['ldap_restore_defaults']) {
variable_del('ldap_disable_request_new_password');
variable_del('ldap_user_pass_form');
variable_del('ldap_disable_user_request_password');
variable_del('ldap_forget_passwords');
variable_del('ldap_login_process');
$msg = 'System wide LDAP settings reset to defaults';
}
else {
variable_set('ldap_user_pass_form', $form_values['ldap_user_pass_form']);
variable_set('ldap_disable_request_new_password', $form_values['ldap_disable_request_new_password']);
variable_set('ldap_forget_passwords', $form_values['ldap_forget_passwords']);
variable_set('ldap_login_process', $form_values['ldap_login_process']);
variable_set('ldap_disable_user_request_password', $form_values['ldap_disable_user_request_password']);
$msg = 'System wide LDAP settings saved';
}
drupal_set_message($msg);
return 'admin/settings/ldapauth/options';
}