fix Registrazione data
fix linkref fix controllo login
This commit is contained in:
@@ -5,7 +5,7 @@ require('./config/config');
|
||||
|
||||
const Email = require('email-templates');
|
||||
|
||||
var i18n = require("i18n");
|
||||
const i18n = require("i18n");
|
||||
|
||||
const { ObjectID } = require('mongodb');
|
||||
const { Settings } = require('./models/settings');
|
||||
@@ -145,13 +145,13 @@ module.exports = {
|
||||
strlinkreg = tools.getHostByIdApp(idapp) + process.env.LINKVERIF_REG + `?idapp=${idapp}&idlink=${idreg}`;
|
||||
return strlinkreg;
|
||||
},
|
||||
getlinkRequestNewPassword: function (idapp, user, tokenforgot) {
|
||||
strlinkreg = tools.getHostByIdApp(idapp) + "/#" + process.env.LINK_REQUEST_NEWPASSWORD + `?idapp=${idapp}&username=${user}&=tokenforgot=${tokenforgot}`;
|
||||
getlinkRequestNewPassword: function (idapp, username, tokenforgot) {
|
||||
strlinkreg = tools.getHostByIdApp(idapp) + "/#" + process.env.LINK_REQUEST_NEWPASSWORD + `?idapp=${idapp}&username=${username}&=tokenforgot=${tokenforgot}`;
|
||||
return strlinkreg;
|
||||
},
|
||||
sendEmail_Registration: async function (lang, emailto, user, idapp, idreg) {
|
||||
|
||||
console.log('idapp', idapp, tools.getNomeAppByIdApp(idapp));
|
||||
// console.log('idapp', idapp, tools.getNomeAppByIdApp(idapp));
|
||||
|
||||
mylocalsconf = {
|
||||
idapp,
|
||||
@@ -178,7 +178,7 @@ module.exports = {
|
||||
this.sendEmail_base('admin/registration/' + tools.LANGADMIN, tools.getManagerEmailByIdApp(idapp), mylocalsconf, '');
|
||||
}
|
||||
},
|
||||
sendEmail_RequestNewPassword: async function (lang, emailto, idapp, tokenforgot) {
|
||||
sendEmail_RequestNewPassword: async function (lang, user, emailto, idapp, tokenforgot) {
|
||||
|
||||
mylocalsconf = {
|
||||
idapp,
|
||||
@@ -186,7 +186,10 @@ module.exports = {
|
||||
locale: lang,
|
||||
nomeapp: tools.getNomeAppByIdApp(idapp),
|
||||
user: user,
|
||||
strlinksetpassword: this.getlinkRequestNewPassword(idapp, user, tokenforgot),
|
||||
name: user.name,
|
||||
username: user.username,
|
||||
surname: user.surname,
|
||||
strlinksetpassword: this.getlinkRequestNewPassword(idapp, user.username, tokenforgot),
|
||||
emailto: emailto,
|
||||
};
|
||||
|
||||
@@ -216,7 +219,7 @@ module.exports = {
|
||||
mylocalsconf.msgreply_after_booking = ris;
|
||||
|
||||
if (recbooking.numpeople > 1)
|
||||
mylocalsconf.participants = recbooking.numpeople.toString() + ' ' + res.__("partecipanti");
|
||||
mylocalsconf.participants = recbooking.numpeople.toString() + ' ' + tools.getres__('partecipanti', res);
|
||||
|
||||
let texthtml = '';
|
||||
if (recbooking.modified) {
|
||||
@@ -256,7 +259,7 @@ module.exports = {
|
||||
};
|
||||
|
||||
if (recbooking.numpeople > 1)
|
||||
mylocalsconf.participants = recbooking.numpeople.toString() + ' ' + res.__("partecipanti");
|
||||
mylocalsconf.participants = recbooking.numpeople.toString() + ' ' + tools.getres__('partecipanti', res);
|
||||
|
||||
this.sendEmail_base('booking/cancelbooking/' + lang, emailto, mylocalsconf, tools.getreplyToEmailByIdApp(idapp));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user