lib/Auth
Aleksander Machniak
machniak at kolabsys.com
Tue Oct 23 12:37:25 CEST 2012
lib/Auth/LDAP.php | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
New commits:
commit ebfb0018182d96ba1760b9594cb045b431116267
Author: Aleksander Machniak <alec at alec.pl>
Date: Tue Oct 23 12:36:49 2012 +0200
Update the session password on own's password change via user.edit (Bug #964)
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 2891857..e2f5d27 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -530,7 +530,18 @@ class LDAP extends Net_LDAP3 {
$user_dn = key($user);
// We should start throwing stuff over the fence here.
- return $this->modify_entry($user_dn, $user[$user_dn], $attributes);
+ $result = $this->modify_entry($user_dn, $user[$user_dn], $attributes);
+
+ // Handle modification of current user data
+ if (!empty($result) && $user_dn == $_SESSION['user']->user_bind_dn) {
+ // update session password
+ if (!empty($result['replace']) && !empty($result['replace']['userpassword'])) {
+ $pass = $result['replace']['userpassword'];
+ $_SESSION['user']->user_bind_pw = is_array($pass) ? implode($pass) : $pass;
+ }
+ }
+
+ return $result;
}
public function user_delete($user)
More information about the commits
mailing list