Do not send new login notification if we have ghost user login

This commit is contained in:
Johannes Zellner
2021-09-20 17:56:37 +02:00
parent 7c70b9050d
commit 212d025579

View File

@@ -63,7 +63,7 @@ async function login(req, res, next) {
eventlog.add(eventlog.ACTION_USER_LOGIN, auditSource, { userId: req.user.id, user: users.removePrivateFields(req.user) });
safe(users.notifyLoginLocation(req.user, ip, userAgent, auditSource));
if (!req.user.ghost) safe(users.notifyLoginLocation(req.user, ip, userAgent, auditSource));
next(new HttpSuccess(200, token));
}