From 9d732e35e1a35401ffb7b495b90bf999c5e15e6a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 11 Dec 2015 13:52:04 +0100 Subject: [PATCH] Check if user isset in $_REQUEST first --- lib/private/util.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/private/util.php b/lib/private/util.php index 9016dc59751..578001988d4 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -951,9 +951,11 @@ class OC_Util { $parameters['canResetPassword'] = true; if (!\OC::$server->getSystemConfig()->getValue('lost_password_link')) { - $user = \OC::$server->getUserManager()->get($_REQUEST['user']); - if ($user instanceof IUser) { - $parameters['canResetPassword'] = $user->canChangePassword(); + if (isset($_REQUEST['user'])) { + $user = \OC::$server->getUserManager()->get($_REQUEST['user']); + if ($user instanceof IUser) { + $parameters['canResetPassword'] = $user->canChangePassword(); + } } } -- 2.39.5