From 7f5b113c26625e6fe676eafdd3f990fbb3fc669f Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 20 Apr 2020 17:19:25 -0700 Subject: [PATCH] Authlog improvements. --- translate/translate.json | 2 +- webserver.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/translate/translate.json b/translate/translate.json index d4a941b3..ba9ca88e 100644 --- a/translate/translate.json +++ b/translate/translate.json @@ -29634,4 +29634,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/webserver.js b/webserver.js index 205e0c0d..030b2dcd 100644 --- a/webserver.js +++ b/webserver.js @@ -1275,6 +1275,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { // Send a notification obj.parent.DispatchEvent([user._id], obj, { action: 'notify', value: 'Email verified:
' + EscapeHtml(user.email) + '.', 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 render(req, res, getRenderPage('message', req, domain), getRenderArgs({ title3: 'Account Verification', message: '
Password for account ' + EscapeHtml(user.name) + ' has been reset to:
' + EscapeHtml(newpass) + '
Login and go to the \"My Account\" tab to update your password. Go to login page.' }, domain)); 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); }); }