Skip to content

Commit 181e11c

Browse files
committed
refactor: remove tmp var and rename var name
1 parent 8d8c0e0 commit 181e11c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Authentication/Actions/Email2FA.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,13 @@ public function handle(IncomingRequest $request)
7575

7676
// Send the user an email with the code
7777
helper('email');
78-
$emailer = emailer();
79-
$ret = $emailer->setFrom(setting('Email.fromEmail'), setting('Email.fromName') ?? '')
78+
$return = emailer()->setFrom(setting('Email.fromEmail'), setting('Email.fromName') ?? '')
8079
->setTo($user->getAuthEmail())
8180
->setSubject(lang('Auth.email2FASubject'))
8281
->setMessage(view(setting('Auth.views')['action_email_2fa_email'], ['code' => $identity->secret]))
8382
->send();
8483

85-
if ($ret === false) {
84+
if ($return === false) {
8685
throw new RuntimeException('Cannot send email for user: ' . $user->getAuthEmail());
8786
}
8887

0 commit comments

Comments
 (0)