mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +00:00
idendify -> identify
This commit is contained in:
parent
ebdce6169e
commit
cff922a0f5
3 changed files with 5 additions and 5 deletions
|
@ -16,7 +16,7 @@ makeRequest = (opts, callback)->
|
|||
|
||||
module.exports =
|
||||
|
||||
idendifyUser: (user_id, old_user_id, callback = (error)->)->
|
||||
identifyUser: (user_id, old_user_id, callback = (error)->)->
|
||||
opts =
|
||||
body:
|
||||
old_user_id:old_user_id
|
||||
|
|
|
@ -87,7 +87,7 @@ module.exports = AuthenticationController =
|
|||
LoginRateLimiter.recordSuccessfulLogin(email)
|
||||
AuthenticationController._recordSuccessfulLogin(user._id)
|
||||
Analytics.recordEvent(user._id, "user-logged-in", {ip:req.ip})
|
||||
Analytics.idendifyUser(user._id, req.sessionID)
|
||||
Analytics.identifyUser(user._id, req.sessionID)
|
||||
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
|
||||
|
|
|
@ -255,7 +255,7 @@ describe "AuthenticationController", ->
|
|||
@LoginRateLimiter.processLoginRequest.callsArgWith(1, null, true)
|
||||
@AuthenticationManager.authenticate = sinon.stub().callsArgWith(2, null, @user)
|
||||
@req.sessionID = Math.random()
|
||||
@AnalyticsManager.idendifyUser = sinon.stub()
|
||||
@AnalyticsManager.identifyUser = sinon.stub()
|
||||
@AuthenticationController.doPassportLogin(@req, @req.body.email, @req.body.password, @cb)
|
||||
|
||||
it "should attempt to authorise the user", ->
|
||||
|
@ -263,8 +263,8 @@ describe "AuthenticationController", ->
|
|||
.calledWith(email: @email.toLowerCase(), @password)
|
||||
.should.equal true
|
||||
|
||||
it "should call idendifyUser", ->
|
||||
@AnalyticsManager.idendifyUser.calledWith(@user._id, @req.sessionID).should.equal true
|
||||
it "should call identifyUser", ->
|
||||
@AnalyticsManager.identifyUser.calledWith(@user._id, @req.sessionID).should.equal true
|
||||
|
||||
it "should setup the user data in the background", ->
|
||||
@UserHandler.setupLoginData.calledWith(@user).should.equal true
|
||||
|
|
Loading…
Reference in a new issue