src/Handlers/GenericHandler.php
public function lockout(Lockout $event): void
    {
        if (config('cortex.auth.emails.throttle_lockout')) {
            switch ($event->request->route('accessarea')) {
                case 'managerarea':
                    $model = app('cortex.auth.manager');
                    break;
                case 'adminarea':
                    $model = app('cortex.auth.admin');
                    break;
                case 'frontarea':
                case 'tenantarea':
                default:
                    $model = app('cortex.auth.member');
                    break;
            }

            $user = get_login_field($loginfield = $event->request->get('loginfield')) === 'email'
                ? $model::where('email', $loginfield)->first()
                : $model::where('username', $loginfield)->first();

            ! $user || $user->notify(new AuthenticationLockoutNotification($event->request->ip(), $event->request->server('HTTP_USER_AGENT')));
        }
    }
public function lockout(Lockout $event): void
    {
        if (config('cortex.auth.emails.throttle_lockout')) {
            switch ($event->request->route('accessarea')) {
                case 'managerarea':
                    $model = app('cortex.auth.manager');
                    break;
                case 'adminarea':
                    $model = app('cortex.auth.admin');
                    break;
                case 'frontarea':
                case 'tenantarea':
                default:
                    $model = app('cortex.auth.member');
                    break;
            }

            $user = get_login_field($loginfield = $event->request->get('loginfield')) === 'email'
                ? $model::where('email', $loginfield)->first()
                : $model::where('username', $loginfield)->first();

            ! $user || $user->notify(new AuthenticationLockoutNotification($event->request->ip(), $event->request->server('HTTP_USER_AGENT')));
        }
    }
public function lockout ( Lockout $ event ) : void { if ( config ( 'cortex.auth.emails.throttle_lockout' ) ) { switch ( $ event -> request -> route ( 'accessarea' ) ) { case 'managerarea' : $ model = app ( 'cortex.auth.manager' ) ; break ; case 'adminarea' : $ model = app ( 'cortex.auth.admin' ) ; break ; case 'frontarea' : case 'tenantarea' : default : $ model = app ( 'cortex.auth.member' ) ; break ; } $ user = get_login_field ( $ loginfield = $ event -> request -> get ( 'loginfield' ) ) === 'email' ? $ model :: where ( 'email' , $ loginfield ) -> first ( ) : $ model :: where ( 'username' , $ loginfield ) -> first ( ) ; ! $ user || $ user -> notify ( new AuthenticationLockoutNotification ( $ event -> request -> ip ( ) , $ event -> request -> server ( 'HTTP_USER_AGENT' ) ) ) ; } }
Listen to the authentication lockout event.

@param \Illuminate\Auth\Events\Lockout $event

@return void
Listen to the authentication lockout event .