Skip to content

Commit 570377b

Browse files
committed
Show headers error in a new line instead of inline, returned the scope of createIdentity() to it's default, so it can be added as a separate PR
1 parent 37ee410 commit 570377b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Authentication/Actions/Email2FA.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function handle(IncomingRequest $request)
7777
$email->setMessage(view(setting('Auth.views')['action_email_2fa_email'], ['code' => $identity->secret]));
7878

7979
if ($email->send(false) === false) {
80-
throw new RuntimeException('Cannot send email for user: ' . $user->email . ' ' . $email->printDebugger(['headers']));
80+
throw new RuntimeException('Cannot send email for user: ' . $user->email . '\n' . $email->printDebugger(['headers']));
8181
}
8282

8383
return view(setting('Auth.views')['action_email_2fa_verify']);
@@ -114,7 +114,7 @@ public function afterLogin(User $user): void
114114
$this->createIdentity($user);
115115
}
116116

117-
protected function createIdentity(User $user): void
117+
private function createIdentity(User $user): void
118118
{
119119
/** @var UserIdentityModel $identityModel */
120120
$identityModel = model(UserIdentityModel::class);

src/Authentication/Actions/EmailActivator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function show(): string
4747
$email->setMessage(view(setting('Auth.views')['action_email_activate_email'], ['code' => $code]));
4848

4949
if ($email->send(false) === false) {
50-
throw new RuntimeException('Cannot send email for user: ' . $user->email . ' ' . $email->printDebugger(['headers']));
50+
throw new RuntimeException('Cannot send email for user: ' . $user->email . '\n' . $email->printDebugger(['headers']));
5151
}
5252

5353
// Display the info page
@@ -100,7 +100,7 @@ public function afterRegister(User $user): void
100100
$this->createIdentity($user);
101101
}
102102

103-
protected function createIdentity(User $user): string
103+
private function createIdentity(User $user): string
104104
{
105105
/** @var UserIdentityModel $identityModel */
106106
$identityModel = model(UserIdentityModel::class);

0 commit comments

Comments
 (0)