Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to key/index off of email instead of username #49

Open
dennishall1 opened this issue Feb 23, 2016 · 0 comments
Open

Option to key/index off of email instead of username #49

dennishall1 opened this issue Feb 23, 2016 · 0 comments

Comments

@dennishall1
Copy link

It looks like name is intended to be username, and not the user's name, as it must be unique. Email must also be unique. It is common, and arguably a better user experience to only require email, as it already must be unique, instead of requiring two fields that have to be unique. Also, a user may forget the username they invented for your site---because it has to be unique for your site, so someone else could have taken the one they wanted---but they are less likely to forget their email address, and if email address requires verification, then nobody else can take their email address on your site.

Personally, I'd much rather just treat email address as username, and dispense with username field.

I suppose I could hack it by creating a hidden field and have javascript copy the email address into the username field just before form submit ... but I'd rather not even have a username field in my database.

Nope, can't hack it that way. Gives error: "Username may not contain any non-url-safe characters." .. but you can still hack it, just with a hack that looks worse by the minute .. javascript runs encodeURIComponent on the email address first, or you might just replace @ with -at- .. then pastes it into the hidden field.

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

No branches or pull requests

1 participant