public function validatePassword()
    {
        // If the user is banned, inactive, or has a pending invitation, abort
        if ($this->_user->status == Users::BANNED || $this->_user->status == Users::INACTIVE || $this->_user->status == Users::PENDING_INVITATION)
            $this->errorCode = self::ERROR_UNKNOWN_IDENTITY;
        else if (!$this->password_verify_with_rehash($this->password, $this->_user->password))
            $this->errorCode = YII_DEBUG ? self::ERROR_PASSWORD_INVALID : self::ERROR_UNKNOWN_IDENTITY;

        if ($this->errorCode === 100 || $this->errorCode === NULL || $this->errorCode === self::REQUIRE_TWO_FACTOR_AUTH)
            return true;

        return false;
    }