Skip to content

Commit 3d71e62

Browse files
committed
refactor: use startUpAction() in LoginController()
1 parent a8eb256 commit 3d71e62

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Controllers/LoginController.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,14 @@ public function loginAction(): RedirectResponse
4747
return redirect()->route('login')->withInput()->with('error', $result->reason());
4848
}
4949

50+
// custom bit of information
51+
$user = $result->extraInfo();
52+
/** @var Session $authenticator */
53+
$authenticator = auth('session')->getAuthenticator();
54+
5055
// If an action has been defined for login, start it up.
51-
$actionClass = setting('Auth.actions')['login'] ?? null;
52-
if (! empty($actionClass)) {
56+
$hasAction = $authenticator->startUpAction('login', $user);
57+
if ($hasAction) {
5358
return redirect()->route('auth-action-show')->withCookies();
5459
}
5560

0 commit comments

Comments
 (0)