Merge pull request #21148 from owncloud/resetpassword-user-issert
Check if user isset in $_REQUEST first
This commit is contained in:
commit
96b28382d9
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue