Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions conf/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
$ldap_login_attribute = "uid";
$ldap_fullname_attribute = "cn";
$ldap_filter = "(&(objectClass=person)($ldap_login_attribute={login}))";
# DN that is the parent of all users
$ldap_userparentdn = "cn=Users,dc=example,dc=com";

# Active Directory mode
# true: use unicodePwd as password field
Expand Down
3 changes: 3 additions & 0 deletions pages/change.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
# Bind
if ( isset($ldap_binddn) && isset($ldap_bindpw) ) {
$bind = ldap_bind($ldap, $ldap_binddn, $ldap_bindpw);
} else if ( $who_change_password == "user" && isset($ldap_login_attribute) && isset($ldap_userparentdn) ) {
$login_dn = $ldap_login_attribute . "=" . $login . "," . $ldap_userparentdn;
$bind = ldap_bind($ldap, $login_dn, $oldpassword);
} else {
$bind = ldap_bind($ldap);
}
Expand Down