From 3436924c0978153350d74f643fc927778b673c8b Mon Sep 17 00:00:00 2001
From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com>
Date: Thu, 7 Dec 2023 00:16:03 +0100
Subject: [PATCH] Removed empty properties from email template
---
app/config/locale/translations/en.json | 2 +-
app/controllers/api/account.php | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/app/config/locale/translations/en.json b/app/config/locale/translations/en.json
index 6d409a0665..0b7cd369bc 100644
--- a/app/config/locale/translations/en.json
+++ b/app/config/locale/translations/en.json
@@ -18,7 +18,7 @@
"emails.magicSession.signature": "{{project}} team",
"emails.authNotify.subject": "New session alert for {{project}}",
"emails.authNotify.hello": "Hey {{user}},",
- "emails.authNotify.body": "We're writing to inform you that a new session has been initiated on your {{project}} account on {{date}} at {{time}}.
Here are the details:
Device: {{device}}
Location: {{country}}
IP Address: {{ip}}
If you did not initiate this session, we strongly recommend that you review your account settings.",
+ "emails.authNotify.body": "We're writing to inform you that a new session has been initiated on your {{project}} account on {{date}} at {{time}}.
Here are the details:
Device: {{device}}
Location: {{country}}
IP Address: {{ip}}
If you did not initiate this session, we strongly recommend that you review your account settings.",
"emails.authNotify.footer": "If you recognize this activity, no further action is required.",
"emails.authNotify.thanks": "Thanks",
"emails.authNotify.signature": "{{project}} team",
diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php
index bb8d314b13..b6735790a3 100644
--- a/app/controllers/api/account.php
+++ b/app/controllers/api/account.php
@@ -371,7 +371,9 @@ App::post('/v1/account/sessions/email')
'device' => $device['deviceBrand'] . " " . $device['deviceModel'] . " " . $device['deviceName'],
'country' => $locale->getText('countries.' . strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown')),
'ip' => $request->getIP(),
- 'redirect' => ''
+ 'redirect' => '',
+ 'code' => '',
+ 'securityPhrase' => '',
];
$queueForMails
@@ -966,7 +968,9 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
'device' => $device['deviceBrand'] . " " . $device['deviceModel'] . " " . $device['deviceName'],
'country' => $locale->getText('countries.' . strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown')),
'ip' => $request->getIP(),
- 'redirect' => ''
+ 'redirect' => '',
+ 'code' => '',
+ 'securityPhrase' => '',
];
$queueForMails
@@ -1752,7 +1756,9 @@ App::put('/v1/account/sessions/phone')
'device' => $device['deviceBrand'] . " " . $device['deviceModel'] . " " . $device['deviceName'],
'country' => $locale->getText('countries.' . strtolower($session->getAttribute('countryCode')), $locale->getText('locale.country.unknown')),
'ip' => $request->getIP(),
- 'redirect' => ''
+ 'redirect' => '',
+ 'code' => '',
+ 'securityPhrase' => '',
];
$queueForMails