validate user stores admin who validates, and fixed change password

This commit is contained in:
arnaucode
2017-09-03 17:03:02 +02:00
parent 5384336d57
commit 5f61486a20
3 changed files with 35 additions and 8 deletions

View File

@@ -12,10 +12,14 @@ var userSchema = new Schema({
avatar: { type: String, default: "img/avatars/racoon.png" },
faircoinString: { type: String, default: "faircoin wallet" },
faircoin: { type: String, default: "img/faircoinpublickey_sample.png" },
email: { type: String, required: true },
email: { type: String, required: true, select: false },
phone: { type: String },
telegram: { type: String },
validated: { type: Boolean, default: false },
validatedBy: {
type: mongoose.Schema.Types.ObjectId,
ref: 'adminModel'
},
valorations: [{
user: {
type: mongoose.Schema.Types.ObjectId,