Batch change usernames

Hi,

You can use the MongoDB shell to update usernames without using the cryosparcm updateuser command:

  1. Enter the MongoDB shell via cryosparcm mongo
  2. Run the following command (change email and username):
db.users.update({ 'emails.0.address': 'email@domain.com' }, { $set: { name: 'newusername' } })
  1. Repeat this command for all users you would like to update, then exit the shell by typing exit

- Suhail

2 Likes