From f1304709712b7264e70d34d9143051df82bc820f Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Fri, 25 Nov 2016 11:27:57 +0000 Subject: [PATCH] log ip address of user when logging in --- .../Features/Authentication/AuthenticationController.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee index 3c19f0de25..3d15f7d01c 100644 --- a/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee +++ b/services/web/app/coffee/Features/Authentication/AuthenticationController.coffee @@ -85,7 +85,7 @@ module.exports = AuthenticationController = UserHandler.setupLoginData(user, ()->) LoginRateLimiter.recordSuccessfulLogin(email) AuthenticationController._recordSuccessfulLogin(user._id) - Analytics.recordEvent(user._id, "user-logged-in") + Analytics.recordEvent(user._id, "user-logged-in", {ip:req.ip}) logger.log email: email, user_id: user._id.toString(), "successful log in" req.session.justLoggedIn = true # capture the request ip for use when creating the session