User 1 login fails when the LDAP Authentication module is enabled with "Mixed mode"
The problem is in ldap_authentication.inc
_ldap_authentication_user_login_authenticate_validate() function has a section that rejects any login by user 1.
line 151
if ($auth_conf->authenticationMode == LDAP_AUTHENTICATION_MIXED) {
if ($account_exists && $account->uid == 1) {
form_set_error('name', 'Failed Authentication');
return FALSE;
}
}
the comments say...
/**
*
* if LDAP_AUTHENTICATION_MIXED return the Drupal built in authentication will
* have already been validated (and failed) so if uid == 1 then throw error
*
**/
...so I guess that we should not even be here if we are already validated. But we are!
Should there be a test for "validated user" in ldap_authentication.module in the dap_authentication_user_login_authenticate_validate() function?
~jsloan
Comments
Comment #1
jsloan commentedfor now I'm using this change to _ldap_authentication_user_login_authenticate_validate()
Comment #2
johnbarclay commentedyeah. So the validation functions are probably in the array in the wrong order; or my logic is flawed. That section of code where the validate functions are added should be heavily commented.
Comment #3
thekevinday commentedwell,looks like you beat me to this bug report.
subscribe.
Comment #4
johnbarclay commentedI put the same code elsewhere and added a check to make sure user 1 was not authenticating on ldap after failing with drupal authentication.
Thanks.