File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 44
55use App \Controllers \BaseController ;
66use CodeIgniter \HTTP \RedirectResponse ;
7+ use CodeIgniter \Shield \Authentication \Authenticators \Session ;
78
89class LoginController extends BaseController
910{
@@ -47,9 +48,14 @@ public function loginAction(): RedirectResponse
4748 return redirect ()->route ('login ' )->withInput ()->with ('error ' , $ result ->reason ());
4849 }
4950
51+ // custom bit of information
52+ $ user = $ result ->extraInfo ();
53+ /** @var Session $authenticator */
54+ $ authenticator = auth ('session ' )->getAuthenticator ();
55+
5056 // If an action has been defined for login, start it up.
51- $ actionClass = setting ( ' Auth.actions ' )[ ' login '] ?? null ;
52- if (! empty ( $ actionClass ) ) {
57+ $ hasAction = $ authenticator -> startUpAction ( ' login ', $ user ) ;
58+ if ($ hasAction ) {
5359 return redirect ()->route ('auth-action-show ' )->withCookies ();
5460 }
5561
You can’t perform that action at this time.
0 commit comments