title: Meteor: How to assign different roles to users during sign up process
body: <p>I am using the meteor package <a href="https://atmospherejs.com/ian/accounts-ui-bootstrap-3" rel="nofollow noreferrer">ian:accounts-ui-bootstrap-3</a> for accounts and  <a href="https://atmospherejs.com/alanning/roles" rel="nofollow noreferrer">alanning:roles</a> for assigning roles.</p>
  
  <p>On the sign up form I have two options one for <strong>Doctor</strong> and one for <strong>Advisor</strong>. I want to assign the selected option as a role to that user. Can someone let me know how to do this?</p>
  
  <p>I have just started learning meteor and don't know much about its flow. I can assign roles to a user if I create the user manually like this:</p>
  
  <pre><code>var adminUser = Meteor.users.findOne({roles:{$in:["admin"]}});
  
  if(!adminUser){
  
      adminUser = Accounts.createUser({
        email: "mohsin.rafi@mail.com",
        password: "admin",
        profile: { name: "admin" }
      });
      Roles.addUsersToRoles(adminUser, [ROLES.Admin]);
   }
  </code></pre>
  
  <p>But I want to assign a roll automatically as a user signs up and select one of the options and that option should be assigned as his role.</p>