mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-07 22:57:48 +02:00
Make emails unique
Emails are made unique. When user attempts to sign in through a provider in which his email is one that is already registered, user is redirected to the signin page with an error passed as a query string parameter.
This commit is contained in:
@@ -52,6 +52,7 @@ var UserSchema = new Schema({
|
||||
email: {
|
||||
type: String,
|
||||
trim: true,
|
||||
unique: true,
|
||||
default: '',
|
||||
validate: [validateLocalStrategyEmail, 'Please fill a valid email address']
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user