mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
user uid instead of cn in distinguished name to auth. user
This commit is contained in:
parent
3fd63b98d9
commit
8f4c2f454b
|
@ -55,7 +55,7 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
|
|||
/* Check if ldap base dn is set, and use ldap server if it is */
|
||||
if (isset($settings->_ldapBaseDN)) {
|
||||
$ldapSearchAttribut = "uid=";
|
||||
$tmpDN = "cn=".$username.",".$settings->_ldapBaseDN;
|
||||
$tmpDN = "uid=".$username.",".$settings->_ldapBaseDN;
|
||||
}
|
||||
|
||||
/* Active directory has a different base dn */
|
||||
|
@ -127,6 +127,7 @@ class SeedDMS_LdapAuthentication extends SeedDMS_Authentication {
|
|||
|
||||
if (!is_bool($search)) {
|
||||
$info = ldap_get_entries($ds, $search);
|
||||
|
||||
if (!is_bool($info) && $info["count"]==1 && $info[0]["count"]>0) {
|
||||
$user = $dms->addUser($username, null, $info[0]['cn'][0], $info[0]['mail'][0], $settings->_language, $settings->_theme, "", 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user