]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check if user isset in $_REQUEST first
authorRobin Appelman <icewind@owncloud.com>
Fri, 11 Dec 2015 12:52:04 +0000 (13:52 +0100)
committerLukas Reschke <lukas@owncloud.com>
Mon, 14 Dec 2015 08:56:52 +0000 (09:56 +0100)
lib/private/util.php

index 9016dc59751c03a6152500cde9bda82f65ce7e72..578001988d4a05fd881208ab4e4acd1014d17fa5 100644 (file)
@@ -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();
+                               }
                        }
                }