public static function failedLogin($email)
    {
        $user = self::where('email', $email)->first();

        if (! is_null($user)) {
            $user->increment('failed_login_attempts');
        }

        $rules = config('jumpgate.users.blocking', null);

        if (is_null($rules)) {
            return true;
        }

        supportCollector($rules)
            ->each(function ($limit, $column) use ($user) {
                if ($limit === 0) {
                    return true;
                }

                $attempts = $user->{$column};

                if ($attempts >= $limit) {
                    $user->blocked();
                }
            });
    }
public static function failedLogin($email)
    {
        $user = self::where('email', $email)->first();

        if (! is_null($user)) {
            $user->increment('failed_login_attempts');
        }

        $rules = config('jumpgate.users.blocking', null);

        if (is_null($rules)) {
            return true;
        }

        supportCollector($rules)
            ->each(function ($limit, $column) use ($user) {
                if ($limit === 0) {
                    return true;
                }

                $attempts = $user->{$column};

                if ($attempts >= $limit) {
                    $user->blocked();
                }
            });
    }
public static function failedLogin ( $ email ) { $ user = self :: where ( 'email' , $ email ) -> first ( ) ; if ( ! is_null ( $ user ) ) { $ user -> increment ( 'failed_login_attempts' ) ; } $ rules = config ( 'jumpgate.users.blocking' , null ) ; if ( is_null ( $ rules ) ) { return true ; } supportCollector ( $ rules ) -> each ( function ( $ limit , $ column ) use ( $ user ) { if ( $ limit === 0 ) { return true ; } $ attempts = $ user -> { $ column } ; if ( $ attempts >= $ limit ) { $ user -> blocked ( ) ; } } ) ; }
When a log in fails, increment the failed count.

@param string $email The email the user tried to log in as.

@return bool
When a log in fails increment the failed count .