You are here

function ldapauth_admin_delete in LDAP integration 5.2

Same name and namespace in other branches
  1. 5 ldapauth.module \ldapauth_admin_delete()
  2. 6 ldapauth.admin.inc \ldapauth_admin_delete()
1 string reference to 'ldapauth_admin_delete'
ldapauth_menu in ./ldapauth.module
Implements hook_menu()

File

./ldapauth.module, line 503

Code

function ldapauth_admin_delete() {
  $ldap_name = arg(4);
  if (!$ldap_name) {
    drupal_goto('admin/settings/ldapauth');
  }
  if ($result = db_fetch_object(db_query("SELECT name FROM {ldapauth} WHERE name = '%s'", $ldap_name))) {
    return confirm_form(array(), t('Are you sure you want to delete the ldap configration named <em><strong>%server</strong></em>?', array(
      '%server' => $ldap_name,
    )), 'admin/settings/ldapauth', t('<p>This action cannot be undone.</p>'), t('Delete'), t('Cancel'));
  }
  else {
    drupal_set_message(t('No such LDAP config: %config', array(
      '%config' => $ldap_name,
    )));
    drupal_goto('admin/settings/ldapauth');
  }
}