Accounts-password: Convert login from email to username with

I have a users collection via the accounts-password package.
So far, my users have signed up using the default email-based system.
However, some users have complained about having to provide an email, and I have no way to reference a user in the interface without publicly displaying their email.

Can I convert my login system to use usernames instead of emails without requiring my users to re-register?

I believe you can just update the user object with a ‘username’ field.

Meteor.users.update(userId, {$set: { username: 'myUsername' }})

With that I think you can just give them a prompt to set a username

1 Like