forked from extern/egroupware
use $phpgw->common->ldapConnect() for ldap connects
This commit is contained in:
parent
519e7bdcaf
commit
aa5d415752
@ -46,12 +46,8 @@
|
||||
|
||||
function change_password($old_passwd, $new_passwd) {
|
||||
global $phpgw_info, $phpgw;
|
||||
$ldap = ldap_connect($phpgw_info["server"]["ldap_host"]);
|
||||
|
||||
if (! @ldap_bind($ldap, $phpgw_info["server"]["ldap_root_dn"], $phpgw_info["server"]["ldap_root_pw"])) {
|
||||
echo "<p><b>Error binding to LDAP server. Check your config</b>";
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
$ldap = $phpgw->common->ldapConnect();
|
||||
|
||||
$encrypted_passwd = $phpgw->common->encrypt_password($new_passwd);
|
||||
$entry["userpassword"] = $encrypted_passwd;
|
||||
|
Loading…
Reference in New Issue
Block a user