function ldapauth_admin_delete in LDAP integration 6
Same name and namespace in other branches
- 5.2 ldapauth.module \ldapauth_admin_delete()
- 5 ldapauth.module \ldapauth_admin_delete()
Implements the LDAP server delete page.
Parameters
$form_state: A form state array.
$sid: A LDAP server ID.
Return value
The form structure.
1 string reference to 'ldapauth_admin_delete'
- ldapauth_menu in ./
ldapauth.module - Implements hook_menu().
File
- ./
ldapauth.admin.inc, line 610 - Module admin page callbacks.
Code
function ldapauth_admin_delete(&$form_state, $sid) {
if (is_numeric($sid) && ($name = db_result(db_query("SELECT name from {ldapauth} WHERE sid = %d", $sid)))) {
$form = array(
'sid' => array(
'#type' => 'hidden',
'#value' => $sid,
),
'name' => array(
'#type' => 'hidden',
'#value' => $name,
),
);
return confirm_form($form, t('Are you sure you want to delete the LDAP server named %name?', array(
'%name' => $name,
)), 'admin/settings/ldap/ldapauth/list', NULL, t('Delete'), t('Cancel'));
}
else {
drupal_not_found();
exit;
}
}