From 6b24c8f7f0d45cef68e5852d9c8bfb08e7aee8e0 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 23 Dec 2018 10:32:56 +0100 Subject: [PATCH] error message fix --- lam/lib/modules/posixAccount.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 7dfc63fd..68ea136d 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -837,8 +837,9 @@ class posixAccount extends baseModule implements passwordService { if ($found) { $success = @ldap_mod_replace($_SESSION['ldap']->server(), $ownerGroups[$i]['dn'], array($searchAttr => $newOwners)); if (!$success) { - logNewMessage(LOG_ERR, '[' . $ldapUser .'] Unable to modify attributes of DN: ' . $ownerGroups[$i]['dn'] . ' (' . ldap_error($_SESSION['ldap']->server())) . ').'; - $messages[] = array('ERROR', sprintf(_('Was unable to modify attributes of DN: %s.'), $ownerGroups[$i]['dn']), getDefaultLDAPErrorString($_SESSION['ldap']->server())); + $ldapError = getDefaultLDAPErrorString($_SESSION['ldap']->server()); + logNewMessage(LOG_ERR, '[' . $ldapUser .'] Unable to modify attributes of DN: ' . $ownerGroups[$i]['dn'] . ' (' . $ldapError . ').'); + $messages[] = array('ERROR', sprintf(_('Was unable to modify attributes of DN: %s.'), $ownerGroups[$i]['dn']), $ldapError); } } }