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

Issue with creating users with an existing email #2238

Closed
Tarang opened this issue Jun 18, 2014 · 1 comment
Closed

Issue with creating users with an existing email #2238

Tarang opened this issue Jun 18, 2014 · 1 comment

Comments

@Tarang
Copy link
Contributor

@Tarang Tarang commented Jun 18, 2014

If you try to create a user who already exists you get this thrown as an Error:

Mongo 2.4

Email already exists.

Mongo 2.6

MongoError: insertDocument :: caused by :: 11000 E11000 duplicate key error index: meteor.users.$emails.address  dup key: { : "user@gmail.com" }

While I know Meteor doesn't officially support MongoDB 2.6 yet. This would be one of the issues that ends up as errors in the logs and misinforms users when they try to create an account.

Fixed by changing

var match = e.err.match(/^E11000 duplicate key error index: ([^ ]+)/);
to

 var match = e.err.match(/^(11000 )?E11000 duplicate key error index: ([^ ]+)/);
@glasser glasser mentioned this issue Jun 18, 2014
12 of 14 tasks complete
@glasser
Copy link
Member

@glasser glasser commented Jun 18, 2014

Thanks, merging into #2036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.