function ldapgroups_admin_edit_submit in LDAP integration 5.2
Same name and namespace in other branches
- 5 ldapgroups.module \ldapgroups_admin_edit_submit()
- 6 ldapgroups.admin.inc \ldapgroups_admin_edit_submit()
File
- ./
ldapgroups.module, line 197
Code
function ldapgroups_admin_edit_submit($form_id, $form_values) {
if ($form_values['confirm']) {
// reset the ldapgroups config to default values - in effect, deactivate this config
db_query("UPDATE {ldapauth} SET ldap_groups_in_dn = '%d', ldap_groups_in_dn_desc = '%d', ldap_group_dn_attribute = '%s', ldap_groups_in_attr = '%d', ldap_group_attr = '%s', ldap_groups_as_entries = '%d', ldap_group_entries = '%s', ldap_group_entries_attribute = '%s' WHERE name = '%s'", '0', '0', '', '0', '', '0', '', '', $form_values['reset_ldap']);
watchdog('ldap', t('ldapgroups: ldap config %config updated.', array(
'%config' => $form_values['reset_ldap'],
)));
}
else {
// update the ldapgroups configuration
db_query("UPDATE {ldapauth} SET ldap_groups_in_dn = '%d', ldap_groups_in_dn_desc = '%d', ldap_group_dn_attribute = '%s', ldap_groups_in_attr = '%d', ldap_group_attr = '%s', ldap_groups_as_entries = '%d', ldap_group_entries = '%s', ldap_group_entries_attribute = '%s' WHERE name = '%s'", $form_values['ldap_groups_in_dn'], $form_values['ldap_groups_in_dn_desc'], $form_values['ldap_group_dn_attribute'], $form_values['ldap_groups_in_attr'], $form_values['ldap_group_attr'], $form_values['ldap_groups_as_entries'], $form_values['ldap_group_entries'], $form_values['ldap_group_entries_attribute'], $form_values['config_name']);
watchdog('ldap', t('ldapgroups: ldap config %config updated.', array(
'%config' => $form_values['config_name'],
)));
}
return 'admin/settings/ldapgroups';
}