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:

  1. 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
  2. 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
  3. 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!

Potential privacy issues

This plugin does not store any personal data.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3

Contributors

Jordi Pujol-Ahulló (Lead maintainer): author
Nicolas Dunand: author
Please login to view contributors details and/or to contact them

Comments RSS

Vis kommentarer
  • Carlos SN
    søn., 9 jun. 2024, 19:29
    Hello, good morning!

    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.
  • Jordi Pujol-Ahulló
    man., 10 jun. 2024, 15:15
    Thanks for the feedback.

    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

  • Melvyn Gomez
    lør., 29 jun. 2024, 06:04
    I'm being using this plugin for long time, but a final user reported that the grades are missing specific in the quiz module, i tested and the user is right, i merged an old user that completed some quizes into a new user, when i checked the table mdl_quiz_grades, the grades are still assigned to the old userid, not the new userid.
  • Melvyn Gomez
    lør., 29 jun. 2024, 07:08
    ohh btw, that happened using the version 2023040402 in Moodle 4.1, the new version fix that issue and works in Moodle 4.1?
  • Jordi Pujol-Ahulló
    man., 1 jul. 2024, 15:12
    Hi Melvyn Gomez,

    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
  • Melvyn Gomez
    tir., 2 jul. 2024, 11:37
    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"
  • Miguel Ángel Yerpes Ramírez
    tor., 11 jul. 2024, 18:28
    I have a problem with the plugin. It allows me to merge, but it does not merge the quiz grades, which is strange, because it has transferred the grades of the assignments given by the teacher. Some indication. Moodle 4.1. and the version of the plugin is the one indicated on the website. Thank you.
  • Jordi Pujol-Ahulló
    tor., 11 jul. 2024, 18:55
    Hi Miguel Ángel,

    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
  • Melvyn Gomez
    fre., 16 aug. 2024, 14:53
    i think the plugin has an issue, i found a specific case.
    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.
  • Jordi Pujol-Ahulló
    fre., 16 aug. 2024, 16:17
    Thanks Malvyn. Could you create an issue on github please? It is exactly an issue. Thanks for the feedback.
  • Gábor Zahemszky
    man., 21 okt. 2024, 17:30
    Hello, after Moodle upgrade to 4.5 this plugin doesn't work. We got these messages:

    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..
  • Friedhelm
    tir., 7 jan. 2025, 21:39
    Hello!

    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
  • Christophe MATHIEU
    man., 27 jan. 2025, 18:38
    Hello,
    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
  • Sketch...
    ons., 12 feb. 2025, 21:07
    Does this plugin work with Moodle sites that run on SQL Server using the Moodle SQLSRV driver ($CFG->dbtype = 'sqlsrv';)?
1 2 3 4 5 6 7 8 9 10 11
Please login to post comments