function ldapauth_user_pass in LDAP integration 6
1 string reference to 'ldapauth_user_pass'
- ldapauth_form_user_pass_alter in ./ldapauth.module
File
- ./ldapauth.module, line 342
- ldapauth provides authentication against ldap server.
Code
function ldapauth_user_pass($form, &$form_state) {
if (isset($account->ldap_authentified)) {
$can_reset = FALSE;
if (!LDAPAUTH_DISABLE_PASS_CHANGE) {
$server = ldapauth_server_load($account->ldap_config);
if (!empty($server->ldapdata_binddn) && !empty($server->ldapdata_bindpw)) {
$can_reset = TRUE;
}
}
if (!$can_reset) {
form_set_error('name', t("This is an LDAP account, to change or retrieve the password, please, contact your LDAP administrator"));
unset($form_state['values']['account']);
}
}
}