Skip to content

Update register.js to allow shorter and longer usernames.#191

Closed
jwrb wants to merge 1 commit into
NodeBB:masterfrom
jwrb:master
Closed

Update register.js to allow shorter and longer usernames.#191
jwrb wants to merge 1 commit into
NodeBB:masterfrom
jwrb:master

Conversation

@jwrb
Copy link
Copy Markdown

@jwrb jwrb commented Aug 21, 2013

Proposal:

Allow for 2 character and 16 character usernames.

Reason:

Shorter usernames are popular in many games that we see on the market today. Coupled with the fact that many other websites also allow them. Changing these values will allow for NodeBB to be unique in which usernames it accepts, as many website administrators turn to custom based solutions since other softwares (phpBB, vBulletin, IPBoad, XenForo) only support 3-16 character usernames.

I personally have 2 letter usernames I use. Would love to be able to sign them up :P

Allow for two character and 16 character usernames. These are common in some video games and are probably needed by many site administrators.
@Yokatta24
Copy link
Copy Markdown

Perhaps make it configurable by an administrator to an extent? This would serve to make all parties happy in case someone had a problem with 2 letter usernames or they wanted to allow longer usernames. Of course, I would limit this to an extent, something like 2-5 for the lower bound and 12-30 for upper bound? Just an idea, but it does cost extra time adding in another configuration option.

@julianlam
Copy link
Copy Markdown
Member

Meta configurations (i.e. those made in the admin panel) can be set on
demand, and the registration page can assume a sensible default if a
minimum / maximum is not set.

I believe @barisusakli did some work allowing the meta config to be exposed
to the client side, so that should be ideal.
On Aug 21, 2013 7:18 PM, "Yokatta24" notifications@github.com wrote:

Perhaps make it configurable by an administrator to an extent? This would
serve to make all parties happy in case someone had a problem with 2 letter
usernames or they wanted to allow longer usernames. Of course, I would
limit this to an extent, something like 2-5 for the lower bound and 12-30
for upper bound? Just an idea, but it does cost extra time adding in
another configuration option.


Reply to this email directly or view it on GitHubhttps://github.com//pull/191#issuecomment-23058000
.

@julianlam
Copy link
Copy Markdown
Member

Try adding "minimum username length" and "maximum username length" to the admin panel under the "settings" tab template. Ensure data-field is set on each of the <input>s.

Then replace the numbers in the conditional with global.config['username:minLength'] and global.config['username:maxLength']

@barisusakli
Copy link
Copy Markdown
Member

87f48e2 added 4 meta configs for user name min/max length and password min/max length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants