2
0
forked from Wavyzz/dolibarr
Files
dolibarr-fork/htdocs/core
Sébastien Luttringer 3f13dacacd Use login from LDAP attribute
The LDAP authentication function (check_user_password_ldap) returns the login
sting when authentication is successful.

The current implementation always return the provided login to the check function,
instead of LDAP entry login field (as defined in the LDAP_FIELD_LOGIN).

This is problematic when you expect user to log with several login, like mail,
or the LDAP login doesn't match the dolibarr database.

For example, the following filter allows users auth with mail and cn ldap fields:
$dolibarr_main_auth_ldap_filter = '(&(objectClass=person)(|(cn=%1%)(mail=%1%)))';
but, dolibarr will not find the user when mail is provided.

This patch returns the $ldap->login when LDAP_FIELD_LOGIN is configured.
2021-01-12 12:07:36 +01:00
..
2020-12-14 22:40:47 +03:00
2021-01-07 12:39:51 +01:00
2020-09-17 22:26:54 +02:00
2021-01-04 12:08:14 +01:00
2020-12-14 22:40:47 +03:00
2020-12-30 21:18:12 +01:00
2021-01-12 12:07:36 +01:00
2021-01-07 12:39:51 +01:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2021-01-02 09:35:57 +01:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00
2020-12-14 22:40:47 +03:00