You are here

function ldapauth_admin_deactivate in LDAP integration 5

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

File

./ldapauth.module, line 194

Code

function ldapauth_admin_deactivate() {
  if (!($sid = arg(4))) {
    drupal_goto('admin/settings/ldapauth');
  }
  if ($row = 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 de-activate the ldap configration named <em><strong>%server</strong></em>?', array(
      '%server' => $row->name,
    )), 'admin/settings/ldapauth', '', t('De-activate'), t('Cancel'));
  }
  else {
    drupal_set_message(t('No such LDAP configuration.'));
    drupal_goto('admin/settings/ldapauth');
  }
}