{"action":"created","issue":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/481","repository_url":"https://api.github.com/repos/jagi/meteor-astronomy","labels_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/481/labels{/name}","comments_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/481/comments","events_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/481/events","html_url":"https://github.com/jagi/meteor-astronomy/issues/481","id":171144719,"number":481,"title":"[Question] Can i use User object replace for Accounts.users ?","user":{"login":"lyquocnam","id":8347826,"avatar_url":"https://avatars.githubusercontent.com/u/8347826?v=3","gravatar_id":"","url":"https://api.github.com/users/lyquocnam","html_url":"https://github.com/lyquocnam","followers_url":"https://api.github.com/users/lyquocnam/followers","following_url":"https://api.github.com/users/lyquocnam/following{/other_user}","gists_url":"https://api.github.com/users/lyquocnam/gists{/gist_id}","starred_url":"https://api.github.com/users/lyquocnam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyquocnam/subscriptions","organizations_url":"https://api.github.com/users/lyquocnam/orgs","repos_url":"https://api.github.com/users/lyquocnam/repos","events_url":"https://api.github.com/users/lyquocnam/events{/privacy}","received_events_url":"https://api.github.com/users/lyquocnam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jagi/meteor-astronomy/labels/question","name":"question","color":"ffc800"},{"url":"https://api.github.com/repos/jagi/meteor-astronomy/labels/v2","name":"v2","color":"d93f0b"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-15T10:20:08Z","updated_at":"2016-08-16T09:19:10Z","closed_at":null,"body":"I use many fields with user. so how to combine or replace Accounts.createUser() with User class created by astronomy ?\r\nMeteor standard have Meteor.loginWithPassword, Meteor.loginWithFacebook .... so can i handle this with User class ?"},"comment":{"url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/comments/240049866","html_url":"https://github.com/jagi/meteor-astronomy/issues/481#issuecomment-240049866","issue_url":"https://api.github.com/repos/jagi/meteor-astronomy/issues/481","id":240049866,"user":{"login":"jagi","id":1051229,"avatar_url":"https://avatars.githubusercontent.com/u/1051229?v=3","gravatar_id":"","url":"https://api.github.com/users/jagi","html_url":"https://github.com/jagi","followers_url":"https://api.github.com/users/jagi/followers","following_url":"https://api.github.com/users/jagi/following{/other_user}","gists_url":"https://api.github.com/users/jagi/gists{/gist_id}","starred_url":"https://api.github.com/users/jagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagi/subscriptions","organizations_url":"https://api.github.com/users/jagi/orgs","repos_url":"https://api.github.com/users/jagi/repos","events_url":"https://api.github.com/users/jagi/events{/privacy}","received_events_url":"https://api.github.com/users/jagi/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T09:19:10Z","updated_at":"2016-08-16T09:19:10Z","body":"You don't perform validation in the `Accounts.createUser` method. Instead you should use the `Accounts.onCreateUser` hook.\r\n\r\n```js\r\nAccounts.onCreateUser(function(options, rawUser) {\r\n  const user = new User(rawUser);\r\n  user.validate();\r\n  return user.raw();\r\n});\r\n```\r\n\r\nIt will be even easier with the new version that is comming\r\n\r\n```js\r\nAccounts.onCreateUser(function(options, user) {\r\n  User.validate(user);\r\n  return user;\r\n});\r\n```"}}
{"actor":{"display_login":"jagi"}}