function ldapauth_server_delete in LDAP integration 6
Delete server settings
Parameters
Mixed $server A server object, array, or an integer sid.:
Boolean $quiet:
2 calls to ldapauth_server_delete()
- ldapauth_admin_delete_submit in ./
ldapauth.admin.inc - Submit hook for the LDAP server delete page.
- ldap_servers_features_revert in ./
ldapauth.features.inc - Implementation of hook_features_revert(). [component_hook]
File
- includes/
ldap.core.inc, line 125 - The core functions that ldapauth supplies for submodules. Will be included by default by ldapauth.
Code
function ldapauth_server_delete($server, $quiet = FALSE) {
if (is_numeric($server)) {
$server = ldapauth_server_load($server);
}
elseif (is_array($server)) {
$server = (object) $server;
}
if ($server && isset($server->sid)) {
ldapauth_userinfo_delete_by_sid($server);
db_query("DELETE FROM {ldapauth} WHERE sid = %d", $server->sid);
if (!$quiet) {
drupal_set_message(t('LDAP Configuration %name has been deleted.', array(
'%name' => $server->name,
)));
}
watchdog('ldapauth', 'LDAP Configuration %name has been deleted.', array(
'%name' => $server->name,
));
}
}