title: Meteor SignUps Forbidden on Accounts.createUser
body: <p>I'm getting the error "SignUps Forbidden" when i try to create a user account. Any ideas why?</p>
  
  <p>My packages:</p>
  
  <p>useraccounts:materialize
  materialize:materialize
  accounts-password
  accounts-facebook
  service-configuration
  accounts-google
  accounts-twitter
  kadira:blaze-layout
  msavin:mongol
  kadira:flow-router
  kevohagan:sweetalert</p>
  
  <p>Client Code:</p>
  
  <pre><code>Template.register.events({
      'click #register-button': function(e, t) {
          e.preventDefault();
          // Retrieve the input field values
          var email = $('#email').val(),
              firstName = $('#first-name').val(),
              lastName = $('#last-name').val(),
              password = $('#password').val(),
              passwordAgain = $('#password-again').val();
  
  
          // Trim Helper
          var trimInput = function(val) {
              return val.replace(/^\s*|\s*$/g, "");
          }
          var email = trimInput(email);
  
          // If validation passes, supply the appropriate fields to the
          // Meteor.loginWithPassword() function.
              Accounts.createUser({
                  email: email,
                  firstName: firstName,
                  lastName: lastName,
                  password: password
              }, function(error) {
                  if (error) {
                      return swal({
                      title: error.reason,
                      text: "Please try again",
                      showConfirmButton: true,
                      type: "error"
                  });
                  } else {
                      FlowRouter.go('/');
                  }
              });
  
          return false;
      }
  });
  </code></pre>
  
  <p>Server code</p>
  
  <pre><code> Accounts.onCreateUser(function(options, user) {
      user.profile = options.profile || {};
  
      user.profile.firstName = options.firstName;
      user.profile.lastName = options.lastName;
  
      user.profile.organization = ["Org"];
      user.roles = ["User"];
  
      return user;
  });
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>Here is a <a href="https://github.com/MMrj9/hubapp" rel="nofollow">link</a> to the repo</p>
  
  <p>The problem seems to be on .....meteor\local\build\programs\server\packages. If i switch the value to false it's useless because it resets on every build.</p>
  
  <pre><code>// Client side account creation is disabled by default:
  // the methos ATCreateUserServer is used instead!
  // to actually disable client side account creation use:
  //
  //    AccountsTemplates.config({
  //        forbidClientAccountCreation: true
  //    });
  
  Accounts.config({
    forbidClientAccountCreation: true
  });
  </code></pre>