# How to create a username having @ character using /account/registration/

**URL:** https://discuss.openedx.org/t/how-to-create-a-username-having-character-using-account-registration/3720
**Category:** Site Operators
**Tags:** api
**Created:** [November 30, 2020, 3:28am UTC](https://discuss.openedx.org/t/how-to-create-a-username-having-character-using-account-registration/3720 "2020-11-30T03:28:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rhasan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/rhasan/32/1831_2.png) [@rhasan](https://discuss.openedx.org/u/rhasan)
#### Post date: [November 30, 2020, 3:28am UTC](https://discuss.openedx.org/t/how-to-create-a-username-having-character-using-account-registration/3720/1 "2020-11-30T03:28:56Z")

</div>

Hi,

I wonder if there is a way to create users with username having a @ character? The django interface says it can be done but the api says it cant be.

At the admin the note says the following against the username field  
https://\*\*\*\*\*\*\*\*/admin/auth/user/add/:  
`Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.`

However the API returns the following:  
`"user_message": "Usernames can only contain letters (A-Z, a-z), numerals (0-9), underscores (_), and hyphens (-)."`

---

<div class="post-metadata">

### Author: ![jramnai](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/jramnai/32/87_2.png) [@jramnai](https://discuss.openedx.org/u/jramnai)
#### Post date: [November 30, 2020, 5:55am UTC](https://discuss.openedx.org/t/how-to-create-a-username-having-character-using-account-registration/3720/2 "2020-11-30T05:55:10Z")

</div>

Hello @rhasan,

Yes, by default registration API will not take special characters in the username.

However, if you want to take special characters in the username then you need to add the below feature flag with true value in your settings file.

`ENABLE_UNICODE_USERNAME`

You can check the corresponding logic [here](https://github.com/edx/edx-platform/blob/open-release/juniper.master/openedx/core/djangoapps/user_authn/views/registration_form.py#L70).

But it is advisable that you should not enable this as there are some conditions in the code-base which fetch user object based on the `@ identifier`. Check [one of the conditions](https://github.com/edx/edx-platform/blob/open-release/juniper.master/lms/djangoapps/certificates/management/commands/cert_whitelist.py#L19#L22).

---

<div class="post-metadata">

### Author: ![rhasan](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/rhasan/32/1831_2.png) [@rhasan](https://discuss.openedx.org/u/rhasan)
#### Post date: [November 30, 2020, 6:13am UTC](https://discuss.openedx.org/t/how-to-create-a-username-having-character-using-account-registration/3720/3 "2020-11-30T06:13:37Z")

</div>

oh cool. Is that possible from django admin?

---

<div class="post-metadata">

### Author: ![jramnai](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/jramnai/32/87_2.png) [@jramnai](https://discuss.openedx.org/u/jramnai)
#### Post date: [November 30, 2020, 6:33am UTC](https://discuss.openedx.org/t/how-to-create-a-username-having-character-using-account-registration/3720/4 "2020-11-30T06:33:02Z")

</div>

No, it is not possible to enable this feature flag from the Django admin panel.
