diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-07 15:14:19 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-12-07 15:14:19 +0100 |
commit | f8f3c9ecf9da1f14722f6d3266a0e80ea157f98f (patch) | |
tree | d2851d889610a6acf06a270aeba705c18ced42ed /lib/private/util.php | |
parent | e44b164f406b52530d81e755c9e1b959e0f1ef27 (diff) | |
download | nextcloud-server-f8f3c9ecf9da1f14722f6d3266a0e80ea157f98f.tar.gz nextcloud-server-f8f3c9ecf9da1f14722f6d3266a0e80ea157f98f.zip |
Remove password reset when the user can not change the password
Diffstat (limited to 'lib/private/util.php')
-rw-r--r-- | lib/private/util.php | 6 |
1 files changed, 6 insertions, 0 deletions
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)); |