From 8da632d4a0deca07496e481f4ea5feb5d6fcaf30 Mon Sep 17 00:00:00 2001 From: Daniel Hoffend Date: Wed, 6 Mar 2019 16:52:10 +0100 Subject: [PATCH] create correct error message when ldap_exop fails --- lam/lib/modules/inetOrgPerson.inc | 2 +- lam/lib/modules/posixAccount.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 5888d095..3742a70c 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -958,7 +958,7 @@ class inetOrgPerson extends baseModule implements passwordService { && ($settings['posixAccount_pwdHash'][0] === 'LDAP_EXOP')) { $success = ldap_exop_passwd($_SESSION['ldap']->server(), $this->getAccountContainer()->finalDN, null, $this->clearTextPassword); 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(); diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 89c2a915..bfe61f88 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -901,7 +901,7 @@ class posixAccount extends baseModule implements passwordService { && ($settings['posixAccount_pwdHash'][0] === 'LDAP_EXOP')) { $success = ldap_exop_passwd($_SESSION['ldap']->server(), $this->getAccountContainer()->finalDN, null, $this->clearTextPassword); 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();