strebl/ldap-auth

Login via another username field

Closed this issue · 2 comments

Hi,
thanks for your work!
I failed with changing the username_field (my database attribute is different).

In the retrieveByCredentials function you are using
$credentials[$this->getUsernameField()]
which is correct.
In validateCredentials you are using hardcoded username
authenticate($credentials['username'], $credentials['password'])

BR

Thanks @cromeis for reporting this issue. Can you try it now?
If it works for you, I'll publish a new version.

Hi @strebl ,
almost... Shouldn't be
authenticate($this->getUsernameField(), $credentials['password']);
but
authenticate($credentials[$this->getUsernameField()], $credentials['password']);