Skip to content

Commit 18c9220

Browse files
committed
fix: remove DEBUG-VIEW output in mail body
1 parent 23fd722 commit 18c9220

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

src/Authentication/Actions/Email2FA.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ public function handle(IncomingRequest $request)
9292
->setFrom(setting('Email.fromEmail'), setting('Email.fromName') ?? '');
9393
$email->setTo($user->email);
9494
$email->setSubject(lang('Auth.email2FASubject'));
95-
$email->setMessage($this->view(setting('Auth.views')['action_email_2fa_email'], ['code' => $identity->secret, 'ipAddress' => $ipAddress, 'userAgent' => $userAgent, 'date' => $date]));
95+
$email->setMessage($this->view(
96+
setting('Auth.views')['action_email_2fa_email'],
97+
['code' => $identity->secret, 'ipAddress' => $ipAddress, 'userAgent' => $userAgent, 'date' => $date],
98+
['debug' => false]
99+
));
96100

97101
if ($email->send(false) === false) {
98102
throw new RuntimeException('Cannot send email for user: ' . $user->email . "\n" . $email->printDebugger(['headers']));

src/Authentication/Actions/EmailActivator.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ public function show(): string
6969
->setFrom(setting('Email.fromEmail'), setting('Email.fromName') ?? '');
7070
$email->setTo($userEmail);
7171
$email->setSubject(lang('Auth.emailActivateSubject'));
72-
$email->setMessage($this->view(setting('Auth.views')['action_email_activate_email'], ['code' => $code, 'ipAddress' => $ipAddress, 'userAgent' => $userAgent, 'date' => $date]));
72+
$email->setMessage($this->view(
73+
setting('Auth.views')['action_email_activate_email'],
74+
['code' => $code, 'ipAddress' => $ipAddress, 'userAgent' => $userAgent, 'date' => $date],
75+
['debug' => false]
76+
));
7377

7478
if ($email->send(false) === false) {
7579
throw new RuntimeException('Cannot send email for user: ' . $user->email . "\n" . $email->printDebugger(['headers']));

src/Controllers/MagicLinkController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ public function loginAction()
125125
->setFrom(setting('Email.fromEmail'), setting('Email.fromName') ?? '');
126126
$email->setTo($user->email);
127127
$email->setSubject(lang('Auth.magicLinkSubject'));
128-
$email->setMessage($this->view(setting('Auth.views')['magic-link-email'], ['token' => $token, 'ipAddress' => $ipAddress, 'userAgent' => $userAgent, 'date' => $date]));
128+
$email->setMessage($this->view(
129+
setting('Auth.views')['magic-link-email'],
130+
['token' => $token, 'ipAddress' => $ipAddress, 'userAgent' => $userAgent, 'date' => $date],
131+
['debug' => false]
132+
));
129133

130134
if ($email->send(false) === false) {
131135
log_message('error', $email->printDebugger(['headers']));

0 commit comments

Comments
 (0)