function ldap_api_delete_server_form_submit in Lightweight Directory Access Protocol (LDAP) 6
Submit hook for the LDAP server form.
File
- ./
ldap_server.admin.inc, line 463
Code
function ldap_api_delete_server_form_submit($form, &$form_state) {
$sid = $form_state['values']['sid'];
$result = db_query("SELECT name from {ldap_servers} WHERE sid = %d", $sid);
if ($row = db_fetch_object($result)) {
db_query("DELETE FROM {ldap_servers} WHERE sid = %d", $sid);
drupal_set_message(t('LDAP server %name has been deleted.', array(
'%name' => $row->name,
)));
watchdog('ldap', 'LDAP server %name was deleted.', array(
'%name' => $row->name,
));
}
}