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

Commit 31c6e707 authored by Akhil's avatar Akhil 🙂
Browse files

Small conditional fix

parent 75430bff
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
                 try {
-                        $mailAddress = !is_null($user->getEMailAddress()) ? $user->getEMailAddress() : '';
+                        $recoveryEmail = $this->config->getUserValue($userId, 'email-recovery', 'recovery-email');
+                        $mailAddress = !is_null($recoveryEmail) ? $recoveryEmail : '';
+                        $mailAddress = is_null($recoveryEmail) ? '' : $recoveryEmail;
                         $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'));