function ldapauth_user_pass in LDAP integration 6
1 string reference to 'ldapauth_user_pass'
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) {
// Admin allows password changes via Drupal
$server = ldapauth_server_load($account->ldap_config);
// Get user's ldapauth server info
if (!empty($server->ldapdata_binddn) && !empty($server->ldapdata_bindpw)) {
$can_reset = TRUE;
// Assume the advance user info in ldapdata can change passwords.
}
}
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']);
}
}
}