update user schema for sparseness and uniqueness on email

This commit is contained in:
Michael Q Larson
2015-01-11 18:24:36 -08:00
parent b30a3e9d93
commit da3ed43b2f

View File

@ -7,7 +7,8 @@ var userSchema = new mongoose.Schema({
type: String,
lowercase: true,
unique: true,
trim: true
trim: true,
sparse: true
},
password: String,
facebook: String,
@ -266,8 +267,8 @@ var userSchema = new mongoose.Schema({
profile: {
username: {
type: String,
default: '',
unique: true,
sparse: true,
lowercase: true,
trim: true
},