Authlog improvements.
Ylian Saint-Hilaire committed
Apr 20, 2020 at 17:19 UTC
ae7b8b9c8e01289c5ce06475d0e975c9e15bb631
2 files changed
+7
-1
translate/translate.json
+1
-1
@@ -29634,4 +29634,4 @@
29634
]
29635
}
29636
]
29637
-}
29637
+}
\ No newline at end of file
webserver.js
+6
@@ -1275,6 +1275,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
1275
1276
// Send a notification
1277
obj.parent.DispatchEvent([user._id], obj, { action: 'notify', value: 'Email verified:<br /><b>' + EscapeHtml(user.email) + '</b>.', nolog: 1, id: Math.random() });
1278
+
1279
+ // Send to authlog
1280
+ if (obj.parent.authlog) { obj.parent.authLog('https', 'Verified email address ' + user.email + ' for user ' + user.name); }
1281
}
1282
});
1283
}
@@ -1309,6 +1312,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
1312
// Send the new password
1313
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));
1314
parent.debug('web', 'handleCheckMailRequest: send temporary password.');
1315
+
1316
+ // Send to authlog
1317
+ if (obj.parent.authlog) { obj.parent.authLog('https', 'Performed account reset for user ' + user.name); }
1318
}, 0);
1319
});
1320
}