diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-12-11 13:52:04 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-12-14 09:56:52 +0100 |
commit | 9d732e35e1a35401ffb7b495b90bf999c5e15e6a (patch) | |
tree | 6cf48a8d2679d55224a7dde4ef4d8cccfa319c78 /lib/private | |
parent | 74de12c698e01514c8fe42727d98aeaa8956eeee (diff) | |
download | nextcloud-server-9d732e35e1a35401ffb7b495b90bf999c5e15e6a.tar.gz nextcloud-server-9d732e35e1a35401ffb7b495b90bf999c5e15e6a.zip |
Check if user isset in $_REQUEST first
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/util.php | 8 |
1 files 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(); + } } } |