From f8f3c9ecf9da1f14722f6d3266a0e80ea157f98f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 7 Dec 2015 15:14:19 +0100 Subject: Remove password reset when the user can not change the password --- lib/private/util.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/private/util.php') diff --git a/lib/private/util.php b/lib/private/util.php index 9929b7d5b1c..532730998c6 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -947,6 +947,12 @@ class OC_Util { $parameters['redirect_url'] = $_REQUEST['redirect_url']; } + $parameters['canResetPassword'] = true; + $user = \OC::$server->getUserManager()->get($_REQUEST['user']); + if ($user instanceof IUser) { + $parameters['canResetPassword'] = $user->canChangePassword(); + } + $parameters['alt_login'] = OC_App::getAlternativeLogIns(); $parameters['rememberLoginAllowed'] = self::rememberLoginAllowed(); \OC_Hook::emit('OC_Util', 'pre_displayLoginPage', array('parameters' => $parameters)); -- cgit v1.2.3