Moodle Plugins directory: Merge user accounts | Moodle.org
Merge user accounts
Administration tools ::: tool_mergeusers
Maintained by
Jordi Pujol-Ahulló,
Nicolas Dunand
This administration tool will merge two Moodle user accounts into one.
Latest release:
3028 sites
3k downloads
99 fans
Current versions available: 6
The intent is to assign all activity & records from user A to user B. This will give the effect of user B seeming to have done everything both users have ever done in Moodle.
This tool replaces the old report_mergeusers, which is now obsolete.
Help us
We do not give support in the comments section below. For any issue on the plugin, please, refer to GitHub and:
- Check if a related issue is already created with the exact detail or similar to the failure you're facing. Add your own experience too. Or
- Build a new issue clicking on https://github.com/jpahullo/moodle-tool_mergeusers/issues/new and add the necessary detail to replay the failure or the trace to help you out, and/or
- Contribute to the plugin with a PR addressing the problem you're solving.
Help us manage this plugin in a more comfortable way in our spare time by using GitHub. Thanks in advance!
Useful links
Contributors
Jordi Pujol-Ahulló (Lead maintainer): author
Nicolas Dunand: author
Please login to view contributors details and/or to contact them
First of all, thank you very much for this great plugin. Great job!
Secondly, I would like to know if there are any plans for adding more varied merging options in the plugin interface in the future. I mean, it would be nice to add options before merging users (right before pressing the merge button). These options that come to mind would be the following:
An option to specifically select which data from the old user profile you want to add to the new one, and which not. For example, 'username', 'first name', 'last name', 'email', 'city', 'user image', or other user profile fields that have been created.
Delete the old account. Give the option to choose.
Add or not the role that the user has.
This is just to mention what I would find necessary, and what comes to mind right now.
I believe this would be a great addition. Although I'm sure you can come up with something better since I'm not as involved in this field.
So, that would be all.
Thank you very much for reading and once again, thank you very much for this wonderful plugin!
Best regards.
Please, request anything into the github as indicated in the description of the plugin. I have created it for you this issue: https://github.com/jpahullo/moodle-tool_mergeusers/issues/272.
Thanks,
Jordi
Thanks for your feedback. I recommend you to follow the instruction on the Description and create an issue on github. It is very benefitial for you and all of us, since you can also spot some other similar issues already filed and add your comments there. On github there is some issue filed of this kind regarding to grades not being merged from time to time. We, in production, with Moodle 4.1, it works as expected. Maybe it is related to some plugin setting that is preventing to produce the result you expect. Revisit the plugin setting uniquekeynewidtomaintain. If there is a grade already for the user to keep and to remove, this setting will finally keep the grade on the user you want.
If you want to follow on this issue, please, go to https://github.com/jpahullo/moodle-tool_mergeusers/issues and look for similar issues and add your comments there.
Thanks again,
Jordi
Try to set the plugin settings up properly to your need, like Melvyn said with "Thanks Jordi, really it was a settings in the plugin to resolve the quiz attempts and it worked using "Merge attempts from both users and renumber"" or with "Revisit the plugin setting uniquekeynewidtomaintain. If there is a grade already for the user to keep and to remove, this setting will finally keep the grade on the user you want.". Probably the first mentioned setting is what you need to update to merge quiz grades properly to your expectations.
Thanks,
Jordi
If an user (eg. user A) has created some custom reports using the "Report builder", the owner id is stored in the field "usercreated" and "usermodified" in the table "mdl_reportbuilder_report".
When merging accounts, from user A to user B, the ownership ID is not being transfered in the table "mdl_reportbuilder_report" to the user B, so the user B can't see the previous reports created by user A.
Warning: include(/var/www/sandbox/availability/condition/condition/version.php): Failed to open stream: No such file or directory in /var/www/sandbox/lib/classes/plugin_manager.php on line 320
Warning: include(): Failed opening '/var/www/sandbox/availability/condition/condition/version.php' for inclusion (include_path='/var/www/sandbox/lib/pear:.:/usr/share/php') in /var/www/sandbox/lib/classes/plugin_manager.php on line 320
Warning: include(/var/www/sandbox/report/report/version.php): Failed to open stream: No such file or directory in /var/www/sandbox/lib/classes/plugin_manager.php on line 320
Warning: include(): Failed opening '/var/www/sandbox/report/report/version.php' for inclusion (include_path='/var/www/sandbox/lib/pear:.:/usr/share/php') in /var/www/sandbox/lib/classes/plugin_manager.php on line 320
Deprecated: Creation of dynamic property AssignSubmissionTableMerger::$duplicateddatamerger is deprecated in /var/www/sandbox/admin/tool/mergeusers/lib/table/assignsubmissiontablemerger.php on line 34
Coding error detected, it must be fixed by a programmer: This file should not be manually included by any component..
After updating to Moodle 4.5.1, the plugin no longer works for us. After clicking on Merge user accounts, the website is no longer displayed correctly.
Best regards
We are in Moodle 4.4.5 version, and the plugin version for Moodle 4.5 (2025012300) was offered as an update. Unfortunately, this latest version of the plugin blocks the installation of the plugin on Moodle 4.4. Perhaps, the version of moodle required in the plugin is not the good one?
Thank you for this very helpfull plugin !
Best regards