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
When you register new user the event Accounts.onCreateUser will be triggered, and you'll be able to extend the User object there.
When Guest Account is created this event is not triggered. How can I extend Guest's user object? or can be Accounts.onCreateUser triggered?
Example of code:
Accounts.onCreateUser(function(options, user){
user.address = {
location: null, // Geolocation.currentLocation() object
street: null, // With coordinates we need only street and department.
department: null,
note: null
};
if (options.profile)
user.profile = options.profile;
return user;
});
FYI. The event is working when you sign up new user, even if guest account is already exists.
The event is triggered when I moved it to lib/ folder from server/ with if (Meteor.isServer) {...}
The text was updated successfully, but these errors were encountered:
Apparently yes. It looks like if you keep in in server/ folder the guest account is created before the onCreateUser code is loaded. I don't see any other reason why it didn't run there.
When you register new user the event Accounts.onCreateUser will be triggered, and you'll be able to extend the User object there.
When Guest Account is created this event is not triggered. How can I extend Guest's user object? or can be Accounts.onCreateUser triggered?
Example of code:
FYI. The event is working when you sign up new user, even if guest account is already exists.
The event is triggered when I moved it to lib/ folder from server/ with if (Meteor.isServer) {...}
The text was updated successfully, but these errors were encountered: