function ldap_servers_disable_http_check in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_servers/ldap_servers.module \ldap_servers_disable_http_check()
disable a logon form if ldap preferences exclude http logon forms
Parameters
drupal logon form array $form:
1 call to ldap_servers_disable_http_check()
- _ldap_authentication_login_form_alter in ldap_authentication/
ldap_authentication.inc - helper function for ldap_authn_form_user_login_block_alter and ldap_authn_form_user_login_alter
File
- ldap_servers/
ldap_servers.module, line 311
Code
function ldap_servers_disable_http_check(&$form) {
if (variable_get('ldap_servers_require_ssl_for_credentails', 1) == 1 && @$_SERVER['HTTPS'] != 'on') {
$tokens = array(
'site_name' => variable_get('site_name', 'this site'),
'site_mail' => variable_get('site_mail', ''),
);
drupal_set_message(t(theme('ldap_servers_https_required', $tokens)), 'error');
$form['#disabled'] = TRUE;
}
}