Moodle plugins directory: Merge user accounts | Moodle.org
Merge user accounts
Administration tool ::: tool_mergeusers
Maintained by Jordi Pujol-Ahulló, Nicolas Dunand
This administration tool will merge two Moodle user accounts into one.
Latest release:
2598 sites
3k downloads
89 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
Also, how do I call the merge tool within PHP with the fromid and toid?
I have in our institution a gatherer that deals with that identifier change nightly. It is a process that reads from an Oracle view and prepared the pair of users. To run it, we have a setting override in our config/config.local.php and put the cli/climerger.php into the server crontab. And it simply runs ok. Without cli parameters.
Having a scheduled task would be very welcome and it would provide a nicer integration with Moodle.
Fell free to create an issue https://github.com/ndunand/moodle-tool_mergeusers/ with all this and contribute, if possible.
I can understand that the part of ldap gatherer may be so specific for your case, but if it can be made for general usecase, it would be very welcome. Scheduled task would be always very welcome.
Thank you for your time.
Jordi
thank you for any contributions for this great plugin.
I would like to know, did you plan a new release for Moodle 4.x and when will it be published?
Best regards,
Anisa
Thanks for contacting.
As I can see in the reports usage, this plugin is running on sites using Moodle 4. I know this plugin is not distributed for Moodle version 4, but if you upgrade and install it, it will run properly. If you find any issue, please contact us on https://github.com/ndunand/moodle-tool_mergeusers/.
Thanks,
Jordi
Is there anything that does not get copied when merging the accounts?
We love this plugin! We are getting ready to move to version 4.X and our hosted provider is requiring all plugins to have a release version of 4.x to be installed on the server. I appreciate that the plugin appears to work in version 4, but would be very grateful if an official version 4 version was released. Many thanks.
Greg
You can ask anything else on the github repo.
Thanks,
Jordi
error/invalidsqlsrvnativetype
No further information is available... the rest of Moodle is running fine... The database is SQL server 2022 on Windows Server 2022... please advise
For whatever reason type char is not defined, so you need to add it (currently on line 715) with the result looking like below... then it works fine. This appears to only be an issue for SQL Server...
case 'CHAR':
case 'VARCHAR':
case 'NVARCHAR':
$type = 'C';
break;
I suggest you to rise an issue on tracker.moodle.org, so that this is included into core. Provide as much detail as you can, and if possible, provide a patch to solve it. The last option will speed up the resolution.
Thanks,
Jordi
Please, open an issue on github (as explained on this page in the yellow box), and report as much detail as you can, such as Moodle version, plugin version, and so, so that we have enough information to investigate.
Off the top of my head, this is the first case of such an issue.
Thanks for reporting.
Jordi
We find this plugin very useful!
Is this plugin compatible with Moodle Workplace and transfers data registered in the data store?
Best regards,
Kristin
It is developed, tested and used on Moodle instances. We can do that because Moodle is open source.
However, the cloud solution Moodle Workplace can be only used through a Moodle Partner and it is not open sourced. Never thoght about it, but, yes, we would like to have this plugin also supporting Moodle Workplace. So I propose you to ask your Moodle Partner to test it and prepare any Pull Requests on the github repo referenced on this page, with the necessary changes to work with Moodle Workplace. I imagine that we could keep a version for Moodle Workplace.
Thanks.
Jordi