Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var options = {
- username: loginVar,
- email: emailVar,
- password: passwordVar,
- profile: {
- poolid: poolidVar,
- passprotect: passwordVar,
- fullemail: emailVar,
- avatar: 0,
- balance: 0,
- }
- }
- Accounts.createUser(options, (err, res) => {
- if(err) {
- if(poolidVar.length != 6 && poolidVar.length > 0 ){
- Materialize.toast("Please Enter 6-digit Pool id, or leave it empty", 4000);
- } else if(loginVar.length < 5){
- Materialize.toast("Login Must be at least 5 sybmols", 4000);
- } else if(emailVar.length < 4){
- Materialize.toast("Please Enter an Email", 4000);
- } else if(passwordVar.length < 6){
- Materialize.toast("Password must have at least 6 symbols", 4000);
- } else {
- console.error(err);
- Materialize.toast(err.reason, 4000);
- }
- }else {
- Materialize.toast('You successfully registered!', 4000);
- $('#signup').modal('close');
- Meteor.setTimeout(() => {
- FlowRouter.go('/office');
- }, 500);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement