public function user()
    {
        $relation = $this->belongsTo($this->getUserModelName());

        if (in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses($this->getUserModelName())))
        {
            $relation->withTrashed();
        }

        return $relation;
    }