protected function checkUserIsPermitted($user)
    {
        if (!isset($user)) {
            Log::debug("Login failed for ".$user[$this->usernameColumnName]." - the user is disabled.", "LOGIN");
            throw new LoginDisabledException();
        }

        if ($this->hasPasswordExpired($user)){
            Log::debug("Login failed for ".$user[$this->usernameColumnName]." - the password has expired.", "LOGIN");
            throw new LoginExpiredException();
        }

        if ($this->isUserTemporarilyLockedOut($user)){
            Log::debug("Login failed for ".$user[$this->usernameColumnName]." - the user is temporarily disabled.", "LOGIN");
            throw new LoginTemporarilyLockedOutException();
        }
    }
protected function checkUserIsPermitted($user)
    {
        if (!isset($user)) {
            Log::debug("Login failed for ".$user[$this->usernameColumnName]." - the user is disabled.", "LOGIN");
            throw new LoginDisabledException();
        }

        if ($this->hasPasswordExpired($user)){
            Log::debug("Login failed for ".$user[$this->usernameColumnName]." - the password has expired.", "LOGIN");
            throw new LoginExpiredException();
        }

        if ($this->isUserTemporarilyLockedOut($user)){
            Log::debug("Login failed for ".$user[$this->usernameColumnName]." - the user is temporarily disabled.", "LOGIN");
            throw new LoginTemporarilyLockedOutException();
        }
    }
protected function checkUserIsPermitted ( $ user ) { if ( ! isset ( $ user ) ) { Log :: debug ( "Login failed for " . $ user [ $ this -> usernameColumnName ] . " - the user is disabled." , "LOGIN" ) ; throw new LoginDisabledException ( ) ; } if ( $ this -> hasPasswordExpired ( $ user ) ) { Log :: debug ( "Login failed for " . $ user [ $ this -> usernameColumnName ] . " - the password has expired." , "LOGIN" ) ; throw new LoginExpiredException ( ) ; } if ( $ this -> isUserTemporarilyLockedOut ( $ user ) ) { Log :: debug ( "Login failed for " . $ user [ $ this -> usernameColumnName ] . " - the user is temporarily disabled." , "LOGIN" ) ; throw new LoginTemporarilyLockedOutException ( ) ; } }
Provides an opportunity for extending classes to do additional checks on the user object before
allowing them to login.

You should throw an exception if you want to prevent the login.

@param $user
@throws \Exception Thrown if the user should not be permitted to login.
Provides an opportunity for extending classes to do additional checks on the user object before allowing them to login .