function ldap_api_deactivate_server_form_submit in Lightweight Directory Access Protocol (LDAP) 6
Submit hook for the LDAP server form.
File
- ./
ldap_server.admin.inc, line 403
Code
function ldap_api_deactivate_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("UPDATE {ldap_servers} SET active = '0' WHERE sid = %d", $sid);
drupal_set_message(t('LDAP server %name has been deactivated.', array(
'%name' => $row->name,
)));
watchdog('ldap', 'LDAP server %name was deactivated.', array(
'%name' => $row->name,
));
}
}