Loading patches/007-recovery-email-field.patch +7 −5 Original line number Diff line number Diff line --- ../../LostControllerOriginal.php 2021-03-22 14:39:36.053745016 +0530 +++ ../../LostController.php 2021-03-22 14:41:58.380676819 +0530 @@ -205,7 +205,8 @@ --- ../../LostControllerOriginal.php 2021-03-22 14:54:51.263702571 +0530 +++ ../../LostController.php 2021-03-22 14:56:32.148293370 +0530 @@ -205,8 +205,9 @@ } try { - $mailAddress = !is_null($user->getEMailAddress()) ? $user->getEMailAddress() : ''; - $decryptedToken = $this->crypto->decrypt($encryptedToken, $mailAddress.$this->config->getSystemValue('secret')); + $recoveryEmail = $this->config->getUserValue($userId, 'email-recovery', 'recovery-email'); + $mailAddress = is_null($recoveryEmail) ? '' : $recoveryEmail; $decryptedToken = $this->crypto->decrypt($encryptedToken, $mailAddress.$this->config->getSystemValue('secret')); + $decryptedToken = $this->crypto->decrypt($encryptedToken, $mailAddress.$this->config->getSystemValue('secret')); } catch (\Exception $e) { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid')); } @@ -334,7 +335,7 @@ */ protected function sendEmail($input) { Loading Loading
patches/007-recovery-email-field.patch +7 −5 Original line number Diff line number Diff line --- ../../LostControllerOriginal.php 2021-03-22 14:39:36.053745016 +0530 +++ ../../LostController.php 2021-03-22 14:41:58.380676819 +0530 @@ -205,7 +205,8 @@ --- ../../LostControllerOriginal.php 2021-03-22 14:54:51.263702571 +0530 +++ ../../LostController.php 2021-03-22 14:56:32.148293370 +0530 @@ -205,8 +205,9 @@ } try { - $mailAddress = !is_null($user->getEMailAddress()) ? $user->getEMailAddress() : ''; - $decryptedToken = $this->crypto->decrypt($encryptedToken, $mailAddress.$this->config->getSystemValue('secret')); + $recoveryEmail = $this->config->getUserValue($userId, 'email-recovery', 'recovery-email'); + $mailAddress = is_null($recoveryEmail) ? '' : $recoveryEmail; $decryptedToken = $this->crypto->decrypt($encryptedToken, $mailAddress.$this->config->getSystemValue('secret')); + $decryptedToken = $this->crypto->decrypt($encryptedToken, $mailAddress.$this->config->getSystemValue('secret')); } catch (\Exception $e) { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid')); } @@ -334,7 +335,7 @@ */ protected function sendEmail($input) { Loading