diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-07-25 17:04:33 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-07-31 09:19:07 +0200 |
commit | 3b0d13944a966930731d3cb9a0216236420796c5 (patch) | |
tree | 05b6e7a694b77568984fd7087a58935a68517942 /core/Controller | |
parent | 57f2ea22c784d7b2c3bbabc6b616b9afc6c5ff3c (diff) | |
download | nextcloud-server-3b0d13944a966930731d3cb9a0216236420796c5.tar.gz nextcloud-server-3b0d13944a966930731d3cb9a0216236420796c5.zip |
Move actual password reset to vue
Signed-off-by: Julius Härtl <jus@bitgrid.net>
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 5ac0557e5d6..e647616dd5b 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -40,6 +40,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; @@ -88,6 +89,8 @@ class LostController extends Controller { private $logger; /** @var Manager */ private $twoFactorManager; + /** @var IInitialStateService */ + private $initialStateService; /** * @param string $appName @@ -118,7 +121,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; @@ -133,6 +137,7 @@ class LostController extends Controller { $this->crypto = $crypto; $this->logger = $logger; $this->twoFactorManager = $twoFactorManager; + $this->initialStateService = $initialStateService; } /** @@ -164,13 +169,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' ); } |