Skip to content

Commit

Permalink
Now that AccountsServer is a class, we should apply context to the me…
Browse files Browse the repository at this point in the history
…thod insertUserDoc
  • Loading branch information
marceloschmidt committed Sep 29, 2015
1 parent 6f5dad3 commit b523eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lib/accounts.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Accounts.onCreateUser (options, user) ->
Accounts.insertUserDoc = _.wrap Accounts.insertUserDoc, (insertUserDoc) ->
options = arguments[1]
user = arguments[2]
_id = insertUserDoc(options, user)
_id = insertUserDoc.call(Accounts, options, user)

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

1 comment on commit b523eb9

@vikas0121
Copy link

@vikas0121 vikas0121 commented on b523eb9 Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help
while calling this method process get stuck.
_id = insertUserDoc.call(Accounts, options, user)

input:
{ username: 'Guest_3129810000-14:35',
department: 'mt3uAwpz4dSqow7pg',
type: 'visitor',
custid: 0,
country: undefined,
userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36', ip: '127.0.0.1', host: 'localhost:3000' }

Please sign in to comment.