diff --git a/src/users.js b/src/users.js index 13936184a..9db8cc094 100644 --- a/src/users.js +++ b/src/users.js @@ -557,7 +557,7 @@ function checkLoginLocation(user, ip, userAgent) { // purge potentially old locations where ts > now() - 6 months const sixMonthsBack = Date.now() - 6 * 30 * 24 * 60 * 60 * 1000; - const newLoginLocation = { ts: Date.now(), ip, simplifiedUserAgent, country, city }; + const newLoginLocation = { ts: Date.now(), ip, userAgent: simplifiedUserAgent, country, city }; let loginLocations = user.loginLocations.filter(function (l) { return l.ts > sixMonthsBack; }); loginLocations.push(newLoginLocation);