Merge pull request #64 from dhoffend/fix-ldap-exop
create correct error message when ldap_exop fails
This commit is contained in:
commit
b2d1f5de58
|
@ -958,7 +958,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
&& ($settings['posixAccount_pwdHash'][0] === 'LDAP_EXOP')) {
|
&& ($settings['posixAccount_pwdHash'][0] === 'LDAP_EXOP')) {
|
||||||
$success = ldap_exop_passwd($_SESSION['ldap']->server(), $this->getAccountContainer()->finalDN, null, $this->clearTextPassword);
|
$success = ldap_exop_passwd($_SESSION['ldap']->server(), $this->getAccountContainer()->finalDN, null, $this->clearTextPassword);
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
return array('ERROR', _('Unable to set password'), getExtendedLDAPErrorMessage($_SESSION['ldap']->server()));
|
return array(array('ERROR', _('Unable to set password'), getExtendedLDAPErrorMessage($_SESSION['ldap']->server())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array();
|
return array();
|
||||||
|
|
|
@ -901,7 +901,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
&& ($settings['posixAccount_pwdHash'][0] === 'LDAP_EXOP')) {
|
&& ($settings['posixAccount_pwdHash'][0] === 'LDAP_EXOP')) {
|
||||||
$success = ldap_exop_passwd($_SESSION['ldap']->server(), $this->getAccountContainer()->finalDN, null, $this->clearTextPassword);
|
$success = ldap_exop_passwd($_SESSION['ldap']->server(), $this->getAccountContainer()->finalDN, null, $this->clearTextPassword);
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
return array('ERROR', _('Unable to set password'), getExtendedLDAPErrorMessage($_SESSION['ldap']->server()));
|
return array(array('ERROR', _('Unable to set password'), getExtendedLDAPErrorMessage($_SESSION['ldap']->server())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return array();
|
return array();
|
||||||
|
|
Loading…
Reference in New Issue