Reputation: 6577
The Accounts.createUser method does not work anymore. A few days ago everything works fine and i am sure that i did not change anything.
I have a form for registration. On submit click the following code will executed:
Edit i forgot to say that this function is in a meteor method so it will be executed on client & server
var newUserData = {
username : post.email,
password : post.pwd,
email : post.email,
profile: {
first_name : post.first_name,
last_name : post.last_name,
register : ''
}
};
console.log('### new user data ###');
console.log(newUserData);
var newUserCreated = Accounts.createUser(newUserData, function(e){
console.log('### createuser callback ###');
console.log(e);
});
console.log(newUserCreated);
The "newUserData" returns a valid object. This one in my example:
{
username: '[email protected]',
password: 'mypassword',
email: '[email protected]',
profile:
{ first_name: 'wadwad',
last_name: 'wadawd',
register: '' }
}
This console log is on client side and server side equal.
The createuser callback just works on client side and returns:
Error: No result from call to createUser
newUserCreated returns nothing - not on client and not on server side.
Any ideas what this error means ? Cant find a reference on google.
Edit 2 If its important to know: The createUser method worked fine until now. I dont change anything in the method where createUser is in it. I already created with this function users and with the Accounts-package i am able to login with these accounts.
Upvotes: 1
Views: 1409
Reputation: 6577
The problem was the callback from createUser. This is a bit stupid I think. The Callback just works in Client side and not on Server side - but when executing the method with a callback on the server side the server crashes and no user will be added.
Its a bit strange but what ever - remove the callback and everything is fine.
Upvotes: 3