From 6ed3476b11fe6e9c4625fb28e8953ac26e8160fb Mon Sep 17 00:00:00 2001
From: Christopher Smith <chris@jalakai.co.uk>
Date: Sat, 15 Feb 2014 20:59:06 +0000
Subject: fixes possibility of a user password change being sent out when a
 password couldn't be/wasn't changed

---
 lib/plugins/usermanager/admin.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'lib')

diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index 156037f09..b9199e586 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -643,9 +643,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
         if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) {
             msg($this->lang['update_ok'],1);
 
-            if ($INPUT->has('usernotify') && $newpass) {
+            if ($INPUT->has('usernotify') && !empty($changes['pass'])) {
                 $notify = empty($changes['user']) ? $olduser : $newuser;
-                $this->_notifyUser($notify,$newpass);
+                $this->_notifyUser($notify,$changes['pass']);
             }
 
             // invalidate all sessions
-- 
cgit v1.2.3