Do not send new login notification if we have ghost user login
This commit is contained in:
@@ -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) });
|
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));
|
next(new HttpSuccess(200, token));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user