diff --git a/src/users.js b/src/users.js index 7f3b2ffd4..73a8c5323 100644 --- a/src/users.js +++ b/src/users.js @@ -561,7 +561,7 @@ function checkLoginLocation(user, ip, userAgent) { let loginLocations = user.loginLocations.filter(function (l) { return l.ts > sixMonthsBack; }); // only stash if we have a real useragent, otherwise warn the user every time - if (!simplifiedUserAgent) loginLocations.push(newLoginLocation); + if (simplifiedUserAgent) loginLocations.push(newLoginLocation); userdb.update(user.id, { loginLocations }, function (error) { if (error) console.error('checkLoginLocation: Failed to update user location.', error);