HowToMoodle BlogSubscribe to our Blog

The Ultimate How-To: Merge user accounts in Moodle

by Joanna Barnfield on | Oct 29, 2014 | Blog, Moodle, Moodle Tips | 0 comments

Duplicate user accounts in Moodle is a huge problem. Often, users forget that they already have an account or don't know that they can change their email address within their existing Moodle account, thus they then create a new account or a new one is created for them.

The problem with this is that if you have taken part in courses with one account and then you get a new account, you lose all your progress. There is no way in Moodle to save this progress or move it to the new account.

Now, thanks to Nicolas Dunand and Jordi Pujol-Ahulló, a new plugin has arrived named 'Merge User Accounts'. The name very much gives away what this plugin does. Essentially, it merges user accounts and moves all activity & records from the old user to the new user.

This is a featured plugin for September 2014 by Moodle and it is going to become an essential tool for every Moodle Administrator who bumps in to this issue.

The plugin is installed as an 'Admin Tool' (/admin/tools in the Moodle directory) and appears for Administrators under Site administration / ► Users / ► Accounts / ► Merge user accounts.

Merge Users Search

The way this tool works, is that you search for the user that you need to merge and both accounts (or more) will appear. You can use all the usual ways of filtering users to find them.
You then choose which user needs to be removed and which user needs kept. You can only choose one user of each option.
The user selected to be removed ('user to remove') is the user that will have the activities and reports moved from which will go to the user you've selected as 'user to keep'.

Once you click 'Save Selection' you will be shown a confirmation of the changes to be made. Simply click 'Merge user accounts' and the operation will begin.

Merge Users Confirmation

Once the operation is complete, you will be shown a screen of what was done. This screen will let you know of anything that wasn't merged or had failed.

Users that are marked to be removed, are not actually removed by default. Instead, these users are suspended. If you wish the user to be deleted you will need to do this manually.

By default, Quiz Attempts, Grades and Grades History are not merged. This can be changed if needed by editing the Merge User settings via Site administration / ► Plugins / ► Admin tools / ► Merge user accounts and changing the 'How to resolve quiz attempts' option.
If there is one thing that could be improved on the plugin, I'd say moving this option to the Merge Users wizard instead. As each user merge could be a different case. Sometimes the new user has already taken part in the quizzes, sometimes they haven't. So this is just one option to keep in mind each time you do a merge.

This is a great plugin for all Moodle administrators to have by their side and I can see it being very loved by the community as a whole. I wouldn't be surprised to see this plugin become a standard in the future.

It supports Moodle 2.2 all the way to 2.7 and can be downloaded via the Moodle.org Plugins directory.

What Next

Do you need help with plugin installation? We want to help you. Call us on 0330 660 1111 or via our website at http://info.howtomoodle.com/contact-us to discuss our technical support service.

Expert Technical Support for your Moodle or Totara Learn site


Share this: