login - Meteor create different accounts with loginButtons -
is possible create different accounts loginbuttons in meteor? seems have change style of form (such add check box wit option "teacher" , "student") , change insert behavior in js. loginbuttons seems create default users us.so possible change files of account-ui or account-password packages make work?
seems you're talking account creation (sign-up) , not login.
you write own custom ui. build template form containing desired login, password, email , type (dropdown or checkbox). create event template , on click #register-button
create new user this:
var user = { username: login, password: password, email: email, profile: { usertype: type } }; accounts.createuser(user);
if execution client side doesn't work (which assume doesn't depending on security settings), have call server method , handle user creation there.
in case missed point, please have @ account section of meteor documentation.
Comments
Post a Comment