User creationDate recorded
This commit is contained in:
1 parent
d1d7fa72b6
commit
48b930e04b
2 files changed
+13
No files matched your search
@@ -6,6 +6,7 @@ const Schema = mongoose.Schema
|
||||
|
||||
const userSchema = new Schema({
|
||||
authId: String,
|
||||
creationDate: String,
|
||||
alias: String,
|
||||
firstName: String,
|
||||
middleName: String,
|
||||
|
||||
@@ -367,9 +367,21 @@ function authenticate (encodedToken, callBackFunction) {
|
||||
return
|
||||
}
|
||||
|
||||
let localDate = new Date()
|
||||
let creationDate = new Date(Date.UTC(
|
||||
localDate.getUTCFullYear(),
|
||||
localDate.getUTCMonth(),
|
||||
localDate.getUTCDate(),
|
||||
localDate.getUTCHours(),
|
||||
localDate.getUTCMinutes(),
|
||||
localDate.getUTCSeconds(),
|
||||
localDate.getUTCMilliseconds())
|
||||
)
|
||||
|
||||
let newUser = new User({
|
||||
alias: alias,
|
||||
authId: authId,
|
||||
creationDate: creationDate.toISOString(),
|
||||
email: email,
|
||||
emailVerified: emailVerified,
|
||||
roleId: '1'
|
||||
|
||||
Reference in new issue
Block a user