src/models/LoginForm.php
private function userAttemptBruteForceLock(User $user)
    {
        if ($this->userAttemptBruteForceLockHasExceeded($user)) {
            return true;
        }
        
        $this->attempts = $user->login_attempt + 1;
        
        if ($this->attempts >= $this->allowedAttempts) {
            $user->updateAttributes(['login_attempt_lock_expiration' => time() + $this->lockoutTime]);
        }
        
        $user->updateAttributes(['login_attempt' => $this->attempts]);
    }
private function userAttemptBruteForceLock(User $user)
    {
        if ($this->userAttemptBruteForceLockHasExceeded($user)) {
            return true;
        }
        
        $this->attempts = $user->login_attempt + 1;
        
        if ($this->attempts >= $this->allowedAttempts) {
            $user->updateAttributes(['login_attempt_lock_expiration' => time() + $this->lockoutTime]);
        }
        
        $user->updateAttributes(['login_attempt' => $this->attempts]);
    }
private function userAttemptBruteForceLock ( User $ user ) { if ( $ this -> userAttemptBruteForceLockHasExceeded ( $ user ) ) { return true ; } $ this -> attempts = $ user -> login_attempt + 1 ; if ( $ this -> attempts >= $ this -> allowedAttempts ) { $ user -> updateAttributes ( [ 'login_attempt_lock_expiration' => time ( ) + $ this -> lockoutTime ] ) ; } $ user -> updateAttributes ( [ 'login_attempt' => $ this -> attempts ] ) ; }
Check if the given user has a lockout, otherwise upcount the attempts.

@param User $user
@return boolean
@since 1.2.0
Check if the given user has a lockout otherwise upcount the attempts .