You are here

function ldapauth_admin_delete in LDAP integration 5

Same name and namespace in other branches
  1. 5.2 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 579

Code

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