You are here

function ldapauth_admin_activate in LDAP integration 6

Same name and namespace in other branches
  1. 5.2 ldapauth.module \ldapauth_admin_activate()
  2. 5 ldapauth.module \ldapauth_admin_activate()

Activates the LDAP server.

Parameters

$form_State: A form_state array.

$sid: A LDAP server ID.

Return value

Form array.

1 string reference to 'ldapauth_admin_activate'
ldapauth_menu in ./ldapauth.module
Implements hook_menu().

File

./ldapauth.admin.inc, line 571
Module admin page callbacks.

Code

function ldapauth_admin_activate(&$form_state, $sid) {
  if (is_numeric($sid) && ($name = db_result(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 activate the server %name?', array(
      '%name' => $name,
    )), 'admin/settings/ldap/ldapauth/list', '', t('Activate'), t('Cancel'));
  }
  else {
    drupal_not_found();
    exit;
  }
}