From 736e884e9a53fb485073800dca2583a31c12d24d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 23 Aug 2016 15:01:38 +0200 Subject: Move the reset token to core app --- core/Controller/LostController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/Controller/LostController.php') diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index c3716e9a8e7..fe6be1e6852 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -151,7 +151,7 @@ class LostController extends Controller { private function checkPasswordResetToken($token, $userId) { $user = $this->userManager->get($userId); - $splittedToken = explode(':', $this->config->getUserValue($userId, 'owncloud', 'lostpassword', null)); + $splittedToken = explode(':', $this->config->getUserValue($userId, 'core', 'lostpassword', null)); if(count($splittedToken) !== 2) { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid')); } @@ -222,7 +222,7 @@ class LostController extends Controller { \OC_Hook::emit('\OC\Core\LostPassword\Controller\LostController', 'post_passwordReset', array('uid' => $userId, 'password' => $password)); - $this->config->deleteUserValue($userId, 'owncloud', 'lostpassword'); + $this->config->deleteUserValue($userId, 'core', 'lostpassword'); @\OC_User::unsetMagicInCookie(); } catch (\Exception $e){ return $this->error($e->getMessage()); @@ -253,7 +253,7 @@ class LostController extends Controller { ISecureRandom::CHAR_DIGITS. ISecureRandom::CHAR_LOWER. ISecureRandom::CHAR_UPPER); - $this->config->setUserValue($user, 'owncloud', 'lostpassword', $this->timeFactory->getTime() .':'. $token); + $this->config->setUserValue($user, 'core', 'lostpassword', $this->timeFactory->getTime() .':'. $token); $link = $this->urlGenerator->linkToRouteAbsolute('core.lost.resetform', array('userId' => $user, 'token' => $token)); -- cgit v1.2.3