I create a new user using the {{>loginButtons}} template and accounts-password, and am successfully logged in, but when I log out and attempt to log back in with the password that I'd set, I get the "User has no password set" error.
I have the following code in accountsServer.js in my server folder:
Accounts.onCreateUser(function (user, options) {
someCollection.insert({
name: user.username,
elo: 1500,
});
return user;
});
And I have set up a USERNAME_ONLY config option in accountsClient.js in my client folder:
Accounts.ui.config({
passwordSignupFields: "USERNAME_ONLY"
});
Can anybody help me out? When I comment out the code entirely in the Accounts.onCreateUser() function, the error goes away, so I'm thinking this is the root of the problem but I'm not sure what's causing it.