function ldapauth_admin_deactivate in LDAP integration 6
Same name and namespace in other branches
- 5.2 ldapauth.module \ldapauth_admin_deactivate()
- 5 ldapauth.module \ldapauth_admin_deactivate()
De-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_deactivate'
- ldapauth_menu in ./
ldapauth.module - Implements hook_menu().
File
- ./
ldapauth.admin.inc, line 532 - Module admin page callbacks.
Code
function ldapauth_admin_deactivate(&$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 de-activate the server %name?', array(
'%name' => $name,
)), 'admin/settings/ldap/ldapauth/list', '', t('De-activate'), t('Cancel'));
}
else {
drupal_not_found();
exit;
}
}