Advertisement
Guest User

Untitled

a guest
Aug 30th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       var options = {
  2.         username: loginVar,
  3.         email: emailVar,
  4.         password: passwordVar,
  5.         profile: {
  6.           poolid: poolidVar,
  7.           passprotect: passwordVar,
  8.           fullemail: emailVar,
  9.           avatar: 0,
  10.           balance: 0,
  11.         }
  12.       }
  13.  
  14.       Accounts.createUser(options, (err, res) => {
  15.         if(err) {
  16.           if(poolidVar.length != 6 && poolidVar.length > 0 ){
  17.             Materialize.toast("Please Enter 6-digit Pool id, or leave it empty", 4000);
  18.           } else if(loginVar.length < 5){
  19.             Materialize.toast("Login Must be at least 5 sybmols", 4000);
  20.           } else if(emailVar.length < 4){
  21.             Materialize.toast("Please Enter an Email", 4000);
  22.           } else if(passwordVar.length < 6){
  23.             Materialize.toast("Password must have at least 6 symbols", 4000);
  24.           } else {
  25.             console.error(err);
  26.             Materialize.toast(err.reason, 4000);
  27.           }
  28.         }else {
  29.           Materialize.toast('You successfully registered!', 4000);
  30.           $('#signup').modal('close');
  31.           Meteor.setTimeout(() => {
  32.             FlowRouter.go('/office');
  33.           }, 500);
  34.         }
  35.       });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement