Users with the same e-mail


#1

Guys, how do you prevent the creation of a new user with the same e-mail, when using accounts-* systems?
Looks like Luca (@Splendido) doesn’t maintain his package meteor-accounts-meld anymore…


#2

Check if the email exists already by performing the user creation method on the server and checking it against the existing Users collections should address that.

var userExists = Users.findOne({ ‘email’: user@email.com }).email
if (userExists != null) {
// Meteor.error(“user exists”, etc.)
} else {
// Add new user
}


#3

According to the documentation, creating a user does this verification for you.


"If there are existing users with a username or email only differing in case, createUser will fail. "
This was a change between Meteor 1.0 and 1.1 I believe.


#4

I think, it isn’t right…
If the user does not remember the service, with which came the last time, this is not right, do not let him into the system using some other service.


#5

It’s true only for accounts-password. Meteor will create three users for accounts-password, accounts-facebook and accounts-google with the same e-mail.