Can I restrict specific strings in usernames?


(jj11909) #1

We have standardized on a specific naming convention for staff on our forum. Is it possible to restrict a specific substring in a username to prevent other users from using it? It is a very specific string that could not be used inadvertently.


#2

You have option in settings: reserved usernames, but I don’t know if ot accepts regexes.


(jj11909) #3

Got it. :man_facepalming:

I just used *+myreserved string and it works just fine.


#4

Always happy to help


(Christoph) #5

To be clear: you are saying that putting *blah into reserved usernames results in oneblah not being allowed as a new user name?


(jj11909) #6

Worked perfectly for me. I entered *_ companyref (note the_is included. We use_company to denote staff in naming) . I then tried to create an account with approx. 30 different usernames with this naming convention and each time I was told it wouldnt work.

So short answer, yes worked perfect for me.


(Joseph Coates) #7

Shouldn’t it be *mystring* to avoid people using something like “MikeMYSTRINGstaff”?


(jj11909) #8

So possibly but I actually don’t care if the substring exists in the middle. I am more so determining the ending. So for example on our site this would be the case:

John_company != allowed
john_companyAsdf == allowed
john_company_john == allowed

So I don’t necessarily mind if the substring exists in the begining or middle or if there are different variations it is more so ensuring users cannot use our identifier at the end of a username.