Code Duplication    Length = 6-6 lines in 2 locations

core/Controller/LoginController.php 1 location

@@ 156-161 (lines=6) @@
153
		$parameters['canResetPassword'] = true;
154
		$parameters['resetPasswordLink'] = $this->config->getSystemValue('lost_password_link', '');
155
		if (!$parameters['resetPasswordLink']) {
156
			if (!is_null($user) && $user !== '') {
157
				$userObj = $this->userManager->get($user);
158
				if ($userObj instanceof IUser) {
159
					$parameters['canResetPassword'] = $userObj->canChangePassword();
160
				}
161
			}
162
		}
163
164
		$parameters['alt_login'] = OC_App::getAlternativeLogIns();

apps/user_ldap/lib/Controller/RenewPasswordController.php 1 location

@@ 108-113 (lines=6) @@
105
106
		$parameters['canResetPassword'] = true;
107
		$parameters['resetPasswordLink'] = $this->config->getSystemValue('lost_password_link', '');
108
		if (!$parameters['resetPasswordLink']) {
109
			$userObj = $this->userManager->get($user);
110
			if ($userObj instanceof IUser) {
111
				$parameters['canResetPassword'] = $userObj->canChangePassword();
112
			}
113
		}
114
		$parameters['cancelLink'] = $this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm');
115
116
		return new TemplateResponse(