- fix: l'admin non riusciva a cambiare il Circuito...

This commit is contained in:
Surya Paolo
2024-04-04 18:43:17 +02:00
parent 970428a359
commit fef8d0fbc7
4 changed files with 43 additions and 10 deletions

View File

@@ -1459,6 +1459,7 @@ UserSchema.statics.createNewReqRegistrationGetLink = async function (idapp, user
// Se è scaduto, ne crea uno nuovo
// Creo il tokenforgot
/*
if (!user.date_tokenreg || (!user.tokenreg) || (user.tokenreg && (user.date_tokenreg < new Date().getTime()))) {
let mycodestr = user._id.toHexString() + new Date().getTime().toString();
@@ -1477,11 +1478,14 @@ UserSchema.statics.createNewReqRegistrationGetLink = async function (idapp, user
}
user.date_tokenreg = tools.AddDate(new Date(), 1);
return await user.save().then(() => {
return user.tokenreg;
});
*/
}
}