# Is this a use case for user custom fields?

**URL:** https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808
**Category:** Support
**Created:** [May 26, 2020, 5:54pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808 "2020-05-26T17:54:58Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 26, 2020, 5:54pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/1 "2020-05-26T17:54:58Z")

</div>

I’ve been trying to figure out how to allow users to create [subforums](https://meta.discourse.org/t/allow-users-to-create-their-own-group-sub-forums-like-slack-channels/152476), that would work like slack channels.

One of the suggestions was to use tags. So a user would create a tag (or an app I build would do it through the api), and that tag’s page would function like the subforum’s page.

The question then is how to make it so that only members of the subforum could post to that subforum. In other words, only members of that subforum could have the subforum’s _tag_ linked to their posts.

Is there a way to use “user custom fields” to achieve this? In some way to mark a user as being permitted to post with a certain tag?

I don’t quite follow what user custom fields are meant for, so I’m hoping to understand more.

---

<div class="post-metadata">

### Author: ![syl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/syl/32/98883_2.png) [@syl](https://meta.discourse.org/u/syl)
#### Post date: [May 26, 2020, 9:50pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/2 "2020-05-26T21:50:57Z")

</div>

> [@JQ331](#):
>
> One of the suggestions was to use tags. So a user would create a tag (or an app I build would do it through the api), and that tag’s page would function like the subforum’s page.

I believe tags don’t come with any user-level permissions. You might want to check **categories** instead.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [May 26, 2020, 9:55pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/3 "2020-05-26T21:55:28Z")

</div>

> [@JQ331](#):
>
> I’ve been trying to figure out how to allow users to create [subforums](https://meta.discourse.org/t/allow-users-to-create-their-own-group-sub-forums-like-slack-channels/152476), that would work like slack channels.

Discourse uses groups and categories to control access to content. Have a look at the video in this topic for details: [How to use category security settings to create private categories](https://meta.discourse.org/t/how-to-use-category-security-settings-to-create-private-categories/87678)

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 26, 2020, 10:01pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/4 "2020-05-26T22:01:10Z")

</div>

> [@syl](#):
>
> I believe tags don’t come with any user-level permissions. You might want to check **categories** instead.

> [@simon](#):
>
> Discourse uses groups and categories to control access to content. Have a look at the video in this topic for details: [How to use category security settings to create private categories](https://meta.discourse.org/t/how-to-use-category-security-settings-to-create-private-categories/87678)

Thanks for the replies, guys. I agree that categories seems like the easier way to do this. But, these would be subforums that users could create a lot. There could be hundreds or more (the subforums are a key piece of the app, so will grow as user base grows).

I’ve been told that creating hundreds/thousands of categories will be a big problem, so that I should look for other solutions. Do you have other suggestions? I am willing to build a separate app that interacts with the API. The key thing I want from Discourse is the outstanding post/reply/tag functionality.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 26, 2020, 10:03pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/5 "2020-05-26T22:03:56Z")

</div>

What you want to create is not something Discourse is aimed for.

You want a Reddit/Discord platform, where people can come and create subreddits/servers they “own” while your retain all control and monetization of the platform.

Discourse aims to be the complete opposite, allowing each subreddit/server/guild to be their own site, own their data and live in their own URL.

While you can hack an open source project a lot, I would recommend using something else that is closer to what you want.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 26, 2020, 10:08pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/6 "2020-05-26T22:08:30Z")

</div>

I appreciate that this is not the normal use case, but I would definitely like to find a way to do this with Discourse, given how awesome discourse is. And I can get decently close–I create a tag with the API, and send users to the tag page that acts like the subforum page. The key piece i am missing is the ability to limit users who can post with that tag.

Discord would not work for these purposes, because of limits they have with integrating with apps. I’m not familiar with how I could integrate reddit with an app.

Are you suggesting that I could actually make this work with Reddit, or did you just mean that is the “type” of functionality I have in mind?

Either way, the key benefit of discourse as I see it is that it is a forum, not a chat. And the forum-like functionality is what I want here. I haven’t seen alternatives to discourse that could work in that regard, but I’m definitely open to suggestions.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 26, 2020, 10:17pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/7 "2020-05-26T22:17:06Z")

</div>

> [@JQ331](#):
>
> The key piece i am missing is the ability to limit users who can post with that tag.

That key piece is not something on the roadmap, and not something we plan to add.

There were **many** topics on this over the years:

> [@User-Created Categories](https://meta.discourse.org/t/user-created-categories/14653/4):
>
> This is really far off. If you trust your users that much, make them all admins as a short term workaround. Otherwise create a topic for new categories and have people post to it when they need a new category… watch that topic as admin, and voilà

> [@How to allow users with L2 to create subcategory](https://meta.discourse.org/t/how-to-allow-users-with-l2-to-create-subcategory/84388/7):
>
> The way discourse is designed, category creation is something you do very rarely. It doesn’t make sense to let non-staff do that. However, tags can be created by non-staff users. Maybe that could be something for your use case?

> [@\[HIRING\] User creating categories plugin](https://meta.discourse.org/t/hiring-user-creating-categories-plugin/90075):
>
> What would you like done? I need someone to make a plugin where any user (regardless of trust level and regular/mod/admin role) can create categories. Then to completely rename Categories to any name I want (it’s always editable). When do you need it done? 1-2 weeks What is your budget, in $ USD that you can offer for this task? $200, more if done superbly.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 26, 2020, 10:42pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/8 "2020-05-26T22:42:16Z")

</div>

> [@Falco](#):
>
> There were **many** topics on this over the years:

I’ve seen those. One difference here is that I am happy to build out an entirely separate app that then interacts with the discourse API to give the user the experience of creating a subgroup. So I can create the subgroup myself in the separate app, associate members with it, etc.

But I would like to still be able to use the discourse front end posting functionality (creating topics, replying, linking to categories, and adding tags mainly) on that subforum page that my app has created.

I was told that there is a way to link user custom fields with tags, or something like that, to limit the tags a user can post to.

But the underlying hope is what I’ve mentioned–I can take care of a lot of the subforum setup on my app’s end, but it would save me a lot of time to still be able to use discourse’s posting functionality.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 26, 2020, 11:37pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/9 "2020-05-26T23:37:59Z")

</div>

I appreciate all the replies. Would someone be able to provide some examples of how user custom fields are normally used?

It seems like I could just add a custom field related to the given subforum (say, ‘subforum123’) to each permitted user, and then when a user goes to a subforum page hit the api to see if the user has the required custom field. If yes, then they can post there. If no, then they cannot, and perhaps I just hide the “new topic” and “reply” buttons.

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [May 27, 2020, 2:41am UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/10 "2020-05-27T02:41:00Z")

</div>

> [@JQ331](#):
>
> Would someone be able to provide some examples of how user custom fields are normally used?

They are generally used to collect information (location, job title etc) at sign up which is displayed on the profile card.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 27, 2020, 9:51pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/11 "2020-05-27T21:51:48Z")

</div>

> [@JQ331](#):
>
> I’ve been trying to figure out how to allow users to create [subforums](https://meta.discourse.org/t/allow-users-to-create-their-own-group-sub-forums-like-slack-channels/152476), that would work like slack channels.

Maybe what you want to do is to make it so that people could create their own discourse (e.g., `username.yoursite.com`) that runs on a multisite installation that has your “home” discourse as the SSO server for the user sub-site. You could conceivably create a plugin that would create a new `username.yoursite.com` discourse site whenever a new user got created. But maybe every user doesn’t want their own sub-forum and you’d instead have . . . something . . . that would let them create their sub-site.

I think that’s starting to get close to what you’re trying to do.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 27, 2020, 9:58pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/12 "2020-05-27T21:58:52Z")

</div>

That is indeed getting close to what i have in mind (“subforums” has been the goal). Thanks. I’ll look more into multisite.

I would have thought that allowing users to create their own sub-site in a multisite structure would be a fair bit more resource intensive than, say, allowing users to create their own categories. Could a multisite work with hundreds or more sub-sites? I’m wondering how much drain that would be on the server, or perhaps its not much more drain than a busy single site?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 27, 2020, 10:03pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/13 "2020-05-27T22:03:40Z")

</div>

> [@JQ331](#):
>
> I would have thought that allowing users to create their own sub-site in a multisite structure would be a fair bit more resource intensive than, say, allowing users to create their own categories

It is, but it has the advantage of being _possible_.

> [@JQ331](#):
>
> Could a multisite work with hundreds or more sub-sites?

Yes, I am aware of at least one company that has hundreds or more sub-sites with at least two different sets of plugins at $100-$300/month. Others charge $20/month per site.

In case it’s not clear, you’re basically building a Discourse hosting company.

You’ll want 4-16GB of ram to start for, say, a few dozen sites.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 27, 2020, 10:11pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/14 "2020-05-27T22:11:43Z")

</div>

> [@pfaffman](#):
>
> I am aware of at least one company that has hundreds or more sub-sites with at least two different sets of plugins at $100-$300/month.

To confirm, do you mean that company pays $100-$300/month to maintain hundreds of subsites? (seems that is what you are saying–that’s a pretty low amount for hundreds of subsites)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 27, 2020, 10:17pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/15 "2020-05-27T22:17:49Z")

</div>

I mean that one company (the one that develops Discourse) charges $100-$300/site that you’re looking to create. Some others charge [on the order of $20/month](https://www.communiteq.com/pricing/); presumably they are happily making money.

It’s probably at least hundred hours to solve the problem that I have proposed. But likely more.

EDIT: But maybe if you just want a single multisite you could get it started in less time than that.

---

<div class="post-metadata">

### Author: ![JQ331](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@JQ331](https://meta.discourse.org/u/JQ331)
#### Post date: [May 27, 2020, 10:19pm UTC](https://meta.discourse.org/t/is-this-a-use-case-for-user-custom-fields/152808/16 "2020-05-27T22:19:26Z")

</div>

Ok. Got it. Thanks for the info.
