Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51db1509 authored by Akhil's avatar Akhil 🙂
Browse files

Used 19.0.9 controller

parent 906191dc
Loading
Loading
Loading
Loading
Loading
+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) {