From 65cb60442ba7112a1b33ac38ee29a5eb3a81ffcf Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 9 Feb 2012 17:50:08 +0000 Subject: [PATCH] use new password after self password change (RFE 3446350) --- lam/HISTORY | 1 + lam/lib/modules.inc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lam/HISTORY b/lam/HISTORY index 6243f384..09ec6a8a 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -6,6 +6,7 @@ March 2012 3.7 -> PDF export - New translation: Slovakian - removed phpGroupWare support (project no longer exists) + - Use new password after self password change (RFE 3446350) - LAM Pro: -> Password self reset can send password notification mails -> Zarafa archiver support diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index cd3df141..f28af0a3 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1723,6 +1723,11 @@ class accountContainer { } else { logNewMessage(LOG_NOTICE, '[' . $ldapUser .'] Modified DN: ' . $DNs[$i]); + // check if the password of the currently logged in user was changed + $lamAdmin = $_SESSION['ldap']->decrypt_login(); + if ((strtolower($DNs[$i]) == strtolower($lamAdmin[0])) && isset($attributes[$DNs[$i]]['info']['userPasswordClearText'][0])) { + $_SESSION['ldap']->encrypt_login($DNs[$i], $attributes[$DNs[$i]]['info']['userPasswordClearText'][0]); + } } } // add attributes