You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I add Accounts.onCreateUser hook in server/main.js, but it never be triggered.
I can see that new user added into database but without onCreateUser logic applied, even server console didn't show anything. Here is code I added on main.js
Accounts.onCreateUser(function(options, user) {
console.log("server on create user triggered");
if (options.profile)
user.profile = options.profile;
// If this is the first user going into the database, make them an admin
if (Meteor.users.find().count() === 0)
user.admin = true;
return user;
});
Anything I am doing wrong or I am missing at here?
The text was updated successfully, but these errors were encountered:
I add Accounts.onCreateUser hook in server/main.js, but it never be triggered.
I can see that new user added into database but without onCreateUser logic applied, even server console didn't show anything. Here is code I added on main.js
Anything I am doing wrong or I am missing at here?
The text was updated successfully, but these errors were encountered: