Merge pull request #21148 from owncloud/resetpassword-user-issert

Check if user isset in $_REQUEST first
This commit is contained in:
Thomas Müller 2015-12-14 11:27:46 +01:00
commit 96b28382d9
1 changed files with 5 additions and 3 deletions

View File

@ -951,9 +951,11 @@ class OC_Util {
$parameters['canResetPassword'] = true; $parameters['canResetPassword'] = true;
if (!\OC::$server->getSystemConfig()->getValue('lost_password_link')) { if (!\OC::$server->getSystemConfig()->getValue('lost_password_link')) {
$user = \OC::$server->getUserManager()->get($_REQUEST['user']); if (isset($_REQUEST['user'])) {
if ($user instanceof IUser) { $user = \OC::$server->getUserManager()->get($_REQUEST['user']);
$parameters['canResetPassword'] = $user->canChangePassword(); if ($user instanceof IUser) {
$parameters['canResetPassword'] = $user->canChangePassword();
}
} }
} }