Can usernames be numbers instead of Letters?

Hello Team, Can username be numbers instead of letters?
and when user register for the forum, only uses email and password, and the system should give a random number.

Why i need to do this?
We use Discourse connect to let the users sign in with our wordpress account, in our wordpress website we use the email address as the username, so when the users are signing to our discourse for the first time the system is giving the the same username from our website which is their email address, at this point the email is exposed…

Any help please? i really need to fix this problem.
i have more than 3000 users in my wrodpress like 100 of them signed up to my discourse with this issue, and had to ask them one by one to edit their username.

Yes.

You shouldn’t send the email address as username in the Discourse Connect payload. Discourse will generate a username that isn’t based on the email address as long as you use a recent beta version or are on the tests-passed branch. Or, you generate a username in your Discourse Connect endpoint and send it in the payload.

2 Likes

Sorry, i don`t understand anything of this.
is there anyway to do it for non professional person like me?
I can accept another option as well, can i force the users to select their username when initially create the account through the SSO?

When using Discourse Connect as your SSO, you are asking Discourse to delegate “all things login” to your Identity Provider of choice. In this case, it’s the job of your Identity Provider system to send Discourse the appropriate username for a user.

2 Likes

That sounds very clear.

Can i achieve the below, like we force the users to change the user name after logging in for the first time?
simple a window pop`s up and ask the user to change the username or select a new one.

When using Discourse Connect it’s up for your Identity Provider to ask the user about the preferred username and pass it to Discourse in the auth payload.

2 Likes

Our username is fixed, we can`t do anything about it especially with wide user base.
We must take the action from Discourse.
But sounds there is no options.