Check if user isset in $_REQUEST first
This commit is contained in:
parent
74de12c698
commit
9d732e35e1
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue