Authlog improvements.

This commit is contained in:
Ylian Saint-Hilaire 2020-04-20 17:19:25 -07:00
parent 554d32190e
commit ae7b8b9c8e
2 changed files with 7 additions and 1 deletions

View File

@ -29634,4 +29634,4 @@
] ]
} }
] ]
} }

View File

@ -1275,6 +1275,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
// Send a notification // Send a notification
obj.parent.DispatchEvent([user._id], obj, { action: 'notify', value: 'Email verified:<br /><b>' + EscapeHtml(user.email) + '</b>.', nolog: 1, id: Math.random() }); obj.parent.DispatchEvent([user._id], obj, { action: 'notify', value: 'Email verified:<br /><b>' + EscapeHtml(user.email) + '</b>.', nolog: 1, id: Math.random() });
// Send to authlog
if (obj.parent.authlog) { obj.parent.authLog('https', 'Verified email address ' + user.email + ' for user ' + user.name); }
} }
}); });
} }
@ -1309,6 +1312,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
// Send the new password // Send the new password
render(req, res, getRenderPage('message', req, domain), getRenderArgs({ title3: 'Account Verification', message: '<div>Password for account <b>' + EscapeHtml(user.name) + '</b> has been reset to:</div><div style=padding:14px;font-size:18px><b>' + EscapeHtml(newpass) + '</b></div>Login and go to the \"My Account\" tab to update your password. <a href="' + domain.url + '">Go to login page</a>.' }, domain)); render(req, res, getRenderPage('message', req, domain), getRenderArgs({ title3: 'Account Verification', message: '<div>Password for account <b>' + EscapeHtml(user.name) + '</b> has been reset to:</div><div style=padding:14px;font-size:18px><b>' + EscapeHtml(newpass) + '</b></div>Login and go to the \"My Account\" tab to update your password. <a href="' + domain.url + '">Go to login page</a>.' }, domain));
parent.debug('web', 'handleCheckMailRequest: send temporary password.'); parent.debug('web', 'handleCheckMailRequest: send temporary password.');
// Send to authlog
if (obj.parent.authlog) { obj.parent.authLog('https', 'Performed account reset for user ' + user.name); }
}, 0); }, 0);
}); });
} }