Server
Accounts.setUsername(userId, newUsername)
import { Accounts } from 'meteor/accounts-base'
Source Change a user's username. Use this instead of updating the database directly. The operation will fail if there is an existing user with a username only differing in case.
Arguments
- userId String
-
The ID of the user to update.
- newUsername String
-
A new username for the user.
Please login to continue.