From 203fc138c9d22e2b29da58e50d953cd8ae1850c6 Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Tue, 19 Sep 2017 08:37:54 +0200 Subject: [PATCH] Improve error message when password changed by non-admin --- utils/changepass.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/changepass.php b/utils/changepass.php index 76acfc2..fc17440 100644 --- a/utils/changepass.php +++ b/utils/changepass.php @@ -38,6 +38,8 @@ if (!$passUser->isValid) { uUtils::exitWithError("User unknown"); } + } else if (!empty($login)) { + uUtils::exitWithError("Unauthorized"); } else { // current user $passUser = $auth->user;