notification: do not send login notification for external users
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ async function login(req, res, next) {
|
||||
|
||||
const auditSource = AuditSource.fromRequest(req);
|
||||
await eventlog.add(req.user.ghost ? eventlog.ACTION_USER_LOGIN_GHOST : eventlog.ACTION_USER_LOGIN, auditSource, { userId: req.user.id, user: users.removePrivateFields(req.user), type, appId: tokens.ID_CLI });
|
||||
if (!req.user.ghost) safe(users.notifyLoginLocation(req.user, ip, userAgent, auditSource), { debug });
|
||||
await safe(users.notifyLoginLocation(req.user, ip, userAgent, auditSource), { debug });
|
||||
|
||||
next(new HttpSuccess(200, token));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user