diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-07-31 11:02:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-31 11:02:20 +0200 |
commit | 436f7b92d59c9fc7a6a95077b254025fb99dba71 (patch) | |
tree | 645a0098cc51ac257d235b7b4b0dc91ae123de2f /core/Controller | |
parent | 1d8b09aa8653d1278fa32355d144b135808d92a3 (diff) | |
parent | 3b0d13944a966930731d3cb9a0216236420796c5 (diff) | |
download | nextcloud-server-436f7b92d59c9fc7a6a95077b254025fb99dba71.tar.gz nextcloud-server-436f7b92d59c9fc7a6a95077b254025fb99dba71.zip |
Merge pull request #16544 from nextcloud/bugfix/16540
Add missing password reset page to vue
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/LostController.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 7947440785b..dcdafaa408c 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -41,6 +41,7 @@ use OCP\AppFramework\Utility\ITimeFactory; use OCP\Defaults; use OCP\Encryption\IEncryptionModule; use OCP\Encryption\IManager; +use OCP\IInitialStateService; use OCP\ILogger; use \OCP\IURLGenerator; use \OCP\IRequest; @@ -89,6 +90,8 @@ class LostController extends Controller { private $logger; /** @var Manager */ private $twoFactorManager; + /** @var IInitialStateService */ + private $initialStateService; /** * @param string $appName @@ -119,7 +122,8 @@ class LostController extends Controller { ITimeFactory $timeFactory, ICrypto $crypto, ILogger $logger, - Manager $twoFactorManager) { + Manager $twoFactorManager, + IInitialStateService $initialStateService) { parent::__construct($appName, $request); $this->urlGenerator = $urlGenerator; $this->userManager = $userManager; @@ -134,6 +138,7 @@ class LostController extends Controller { $this->crypto = $crypto; $this->logger = $logger; $this->twoFactorManager = $twoFactorManager; + $this->initialStateService = $initialStateService; } /** @@ -165,13 +170,15 @@ class LostController extends Controller { 'guest' ); } + $this->initialStateService->provideInitialState('core', 'resetPasswordUser', $userId); + $this->initialStateService->provideInitialState('core', 'resetPasswordTarget', + $this->urlGenerator->linkToRouteAbsolute('core.lost.setPassword', ['userId' => $userId, 'token' => $token]) + ); return new TemplateResponse( 'core', - 'lostpassword/resetpassword', - array( - 'link' => $this->urlGenerator->linkToRouteAbsolute('core.lost.setPassword', array('userId' => $userId, 'token' => $token)), - ), + 'login', + [], 'guest' ); } |