Can usernames be numbers instead of Letters?

AI-generated summary

In a support thread titled ‘Can usernames be numbers instead of Letters?’, Jay91 asks if usernames can be numeric, especially since their WordPress site uses email addresses as usernames — which are then exposed during Discourse SSO login via Discourse Connect. Jay91 explains they have over 3,000 users and 100 already affected, requiring manual fixes. gerhard confirms numeric usernames are allowed and advises against sending email as username in the SSO payload, suggesting either generating a random username server-side or upgrading to a recent Discourse version. Jay91 requests simpler, non-technical solutions and asks if users can be forced to choose a username upon first login. Falco clarifies that with Discourse Connect, the Identity Provider (WordPress) must supply the username, and Jay91 seeks to force username selection via a pop-up after login — which Falco reiterates must be handled by the Identity Provider. Jay91 concludes that since their WordPress usernames are fixed, they need Discourse to handle this — but no built-in option exists.

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.

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.

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.

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.