Skip to content

Commit b523eb9

Browse files
Now that AccountsServer is a class, we should apply context to the method insertUserDoc
1 parent 6f5dad3 commit b523eb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/lib/accounts.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Accounts.onCreateUser (options, user) ->
4848
Accounts.insertUserDoc = _.wrap Accounts.insertUserDoc, (insertUserDoc) ->
4949
options = arguments[1]
5050
user = arguments[2]
51-
_id = insertUserDoc(options, user)
51+
_id = insertUserDoc.call(Accounts, options, user)
5252

5353
# when inserting first user give them admin privileges otherwise make a regular user
5454
firstUser = RocketChat.models.Users.findOne({},{sort:{createdAt:1}})

0 commit comments

Comments
 (0)