Update usernames and delete users with file import
Is there a method to
1. change usernames
2. delete users
with a file import?
The Import From File function (Admin > System Admin) cannot change usernames or delete users out of the box. The reasons are that username is used as the field to match to a record, and that we rarely delete users from the system, marking them as Left instead to avoid orphaning other data in the system.
It is possible that Import From File can be used, with a custom import, to change usernames, but we've not tried it before.
However, if you have a spreadsheet listing existing and new usernames, and usernames to delete, we can right some custom SQL, generated from within a spreadsheet to help with this. Feel free to email the list to firstname.lastname@example.org and I'll see what I can do.
The reason for this is a good number of times, when schools are initially getting set up, they are not certain what they want the username to be, and then when they’re up and running change their minds.
An example is a school that decides to use email address as username, realizes some emails are longer than 20 characters, and then decides to switch to some iteration of phone number (which is unique) instead.
So instead of doing this manually for each user, a script using a spreadsheet with the current and new username columns would be helpful.
And the deletion of users is to take care of mistakes made with wrong user imports at the start, but not for students who have left.
Hope this helps.
In other words you have successfully imported a batch of 100 user accounts. Only problem is it’s the wrong file you used meant for another project. You now find yourself looking for a way to remove the 100 accounts.
edited August 2020
These use cases make sense. We don't have time to build this in right now, but you can use the attached spreadsheet, which contains one table for each case, and use them to create the SQL queries that do what you want. Simply enter your data, duplicate the formula to produce the queries, and then run all of the queries in a client.
Perfect. Just what I need. Thanks