function ldapauth_admin_activate in LDAP integration 5
Same name and namespace in other branches
- 5.2 ldapauth.module \ldapauth_admin_activate()
- 6 ldapauth.admin.inc \ldapauth_admin_activate()
1 string reference to 'ldapauth_admin_activate'
- ldapauth_menu in ./
ldapauth.module - Implements hook_menu()
File
- ./
ldapauth.module, line 225
Code
function ldapauth_admin_activate() {
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 activate the ldap configration named <em><strong>%server</strong></em>?', array(
'%server' => $row->name,
)), 'admin/settings/ldapauth', '', t('Activate'), t('Cancel'));
}
else {
drupal_set_message(t('No such LDAP configuration.'));
drupal_goto('admin/settings/ldapauth');
}
}