protected function findUser()
    {
        $query = $this->model->newQuery();

        if ($query->getMacro('withTrashed')) {
            // If the withTrashed macro exists on our User model, then we must be
            // using soft deletes. We need to make sure we include these
            // results so we don't create duplicate user records.
            $query->withTrashed();
        }

        /** @var \Illuminate\Database\Eloquent\Scope $scope */
        $scope = new static::$scope(
            $this->getUserObjectGuid(),
            $this->getUserUsername()
        );

        $scope->apply($query, $this->model);

        return $query->first();
    }