# Optional global invite code

**URL:** <https://meta.discourse.org/t/optional-global-invite-code/144376>\
**Category:** Announcements\
**Tags:** new-feature, invites\
**Created:** [March 15, 2020, 10:25am UTC](https://meta.discourse.org/t/optional-global-invite-code/144376 "2020-03-15T10:25:52Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [March 15, 2020, 10:25am UTC](https://meta.discourse.org/t/optional-global-invite-code/144376/1 "2020-03-15T10:25:52Z")

</div>

Per:

[https://github.com/discourse/discourse/commit/a1d660d9515fa446fea85bfea3b4c9b96ac75320](https://github.com/discourse/discourse/commit/a1d660d9515fa446fea85bfea3b4c9b96ac75320)

A new options setting called `invite_code` was added.

When set, all accounts being registered must enter the invite code in order to be allowed account creation. Users without this code are not allowed to register an account.

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/5/6563798460d6945a1f36f14e1e8082e4d527b0fd.png)

If the invite is code is wrong user gets a helpful error:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/e/be957338645080dee576be362a1dc90a9e191626.png)

Feature is **100% optional!**. At the moment it is only compatible local auth however we will improve that in future iterations.

If you enable the global invite code it applies, if not it does not and the invite code will not appear in the registration dialog.

---

_[View the full topic](https://meta.discourse.org/t/optional-global-invite-code/144376)._
