public function logAttempt(array $input, $mustBeConfirmed = true)
    {
        $remember = $this->extractRememberFromArray($input);

        $given_identity = $input[$this->identity()];

        if($this->loginThrottling($given_identity)){

            $account = $this->findByIdentity([$this->identity() => $given_identity]);

            if($account instanceof Entity){

                if(!$account->confirmed && $mustBeConfirmed){
                    return false;
                }

                if(!$this->checkPassword($account, $input)){
                    return false;
                }

                $this->login($account, $remember);

                return true;
            }
        }

        return false;
    }
public function logAttempt(array $input, $mustBeConfirmed = true)
    {
        $remember = $this->extractRememberFromArray($input);

        $given_identity = $input[$this->identity()];

        if($this->loginThrottling($given_identity)){

            $account = $this->findByIdentity([$this->identity() => $given_identity]);

            if($account instanceof Entity){

                if(!$account->confirmed && $mustBeConfirmed){
                    return false;
                }

                if(!$this->checkPassword($account, $input)){
                    return false;
                }

                $this->login($account, $remember);

                return true;
            }
        }

        return false;
    }
public function logAttempt ( array $ input , $ mustBeConfirmed = true ) { $ remember = $ this -> extractRememberFromArray ( $ input ) ; $ given_identity = $ input [ $ this -> identity ( ) ] ; if ( $ this -> loginThrottling ( $ given_identity ) ) { $ account = $ this -> findByIdentity ( [ $ this -> identity ( ) => $ given_identity ] ) ; if ( $ account instanceof Entity ) { if ( ! $ account -> confirmed && $ mustBeConfirmed ) { return false ; } if ( ! $ this -> checkPassword ( $ account , $ input ) ) { return false ; } $ this -> login ( $ account , $ remember ) ; return true ; } } return false ; }
Attempt to log a user into the application with password and email

@param array $input

@param bool $mustBeConfirmed If true, the user must have confirmed his email account in order to log-in.

@return bool Success.
Attempt to log a user into the application with password and email