如何使用用户帐户meteor包进行两次不同的用户注册?

时间:2017-08-04 15:29:12

标签: javascript meteor

我对流星有点新鲜,我一直在尝试为买家和卖家两种不同类型的用户创建登录系统。当我使用useraccounts包并调用atform模板时{{> atform}}我可以轻松创建帐户。但我想为卖家帐户注册添加一些字段(注册)说商店名称,电话号码等,如果我将这些字段添加到atForm模板,他们也反映在买家注册上,我怎样才能绕过这个?有什么方法可以为atform模板提供两种不同的外观?

1 个答案:

答案 0 :(得分:0)

  1. Since you segregating type of user, you can use https://github.com/alanning/meteor-roles.

  2. From your question, what I understood is you navigate to atForm after you s ign-in. So while sign-up/registering you can provide selectbox to ask what kind of user he/she is and then just beforing creating user you can assign a role too.

  3. For atForm, you can have a common form, but you can check role before showing certain fields.