[SOLVED] Is there a way to register a user without password initially?


Hi all,

I have search the doc, seems possible. But when I call the registerUser method with only username and email, it failed to let me pass through. Any idea?


You create user without password only on server. So you can use method that works on server.

Check out doc: Accounts.createUser


Yup, I was calling the createUser from server side. But I still got the error required me to input password. emmm… what am i missing.


Can you post code snippet and server log?


Server side:

	// call from client
	retailerRegister: function() {
		return Accounts.createUser({
			username: 'hello',
			email: 'hellow@gmail.com'

Error (something like this):

Exception while simulating the effect of invoking 'retailerRegister' Error: Must set options.password {stack: (...), message: "Must set options.password"}message: "Must set options.password"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: d Error: Must set


Does it log from web console?

Are you really sure your method only works on server? Where is it located? Make sure whether it is on /server ?


You are right! I was putting it in /collections folder. I will test it only on server. Thanks. :smiley: I will mark this as solved. Thanks.