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:
2610 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:

  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

Comments

  • Valery Fremaux
    Fri, 20 Jun 2014, 8:05 PM
    Hi guys, this plugin seems a good idea. Does it support any addition possibility or framework to handle custom plugins ?
  • Jordi Pujol-Ahulló
    Wed, 25 Jun 2014, 2:46 PM
    Hi!

    I suppose you are referring to handle database tables for custom or third party plugins on Moodle. If you already know how they work and the compound indexes exist they have, you just need to create a MERGEUSERS/config/config.local.php file (as README states) and specify your local configuration. Just it.

    I hope I had answered your questions.

    Saludos,

    Jordi
  • Jordi Pujol-Ahulló
    Tue, 22 Jul 2014, 4:33 AM
    Hello all!

    We are proud to announce last updates on this Moodle tool for merging users. This tool is very helpful when several users may appear in your Moodle instance when referring to the same person. Why is it useful? This tool allows you to unify user data from Moodle to one of them, so that the person sees as all his/her activity had been done with the remaining user. Interesting, isn't it!

    Last version recently published is 1.10, from July 2014, and includes all these major features:

    1. Now, you can force that merging users will be only proceed if your database supports transactions. A plugin setting allows you to make it less restrictive and force merging users in any case.

    2. Events are triggered when users are merged. This can be helpful to address specific actions from other Moodle plugins.

    3. There are a list of database tables that are, by default, omitted and not processed by this tool. However, because of the community petition, you can force their process by this tool by selecting them in the plugin settings.

    4. We present, thanks to John Hoopes contribution, a new user interface, which displays a wizard to search for users to merge and, finally, confirm the users to merge. Thanks John Hoopes!!!

    5. Thanks to community, Tim Hunt and Luis de Vasconcelos [1], we have addressed correctly the merging of quiz attempts. After sharing opinions with the community, we have included 4 different options in the way quiz attempts can be merged. See README for more details.

    Among others, this plugin considers other compound indexes not detected before, thanks to the community too!

    From a developer viewpoint, this last version presents a lot of code refactoring, apart from all these features. In addition, this plugin is available in Catalan, Spanish, French and English.

    All your comments, bug reporting, patch and code contribution, as well as feature proposals are welcome.

    Thanks to all the people who contributed with comments, activity on github, forums and tool page on moodle.org. Special thanks to Luis de Vasconcelos and Tim Hunt to throw light on the correct way of merging quiz attempts.

    Saludos,

    Jordi

    [1] https://moodle.org/mod/forum/discuss.php?d=258979
  • Blair F.
    Wed, 30 Jul 2014, 2:58 AM
    Just installed this on Moodle 2.6.4, with no problems. However, when I try to run it I get the following error: Database type mysql not supported.
  • Nicolas Dunand
    Wed, 30 Jul 2014, 1:50 PM
    Hi Blair,
    In your Moodle's main config.php file, you should set $CFG->dbtype = 'mysqli' (i.e., 'mysqli' instead of 'mysql').
  • Blair F.
    Fri, 1 Aug 2014, 6:47 AM
    Thanks, I'll try that when our I.T. guy gets back. I don't have that level of access. Would this affect anything else?
  • Blair F.
    Wed, 6 Aug 2014, 5:00 AM
    Nicolas, I'm really sorry to bother you with this, but regarding your suggested change, I'm reluctant to ask my I.T. guy to make changes to a core moodle file to accommodate one plugin (as useful as that plugin may be) without understanding why. He's going to want to know if I've confirmed that this doesn't have any negative effects elsewhere. And, if it doesn't then why is it wrong in the first place? Shouldn't the change take place in the plugin, itself, and not the a main moodle file?

    I tried digging around to see if I could find an answer somewhere, but wasn't able to find anything that alleviated my concerns. I found this, but it didn't help: https://github.com/ndunand/moodle-tool_mergeusers/issues/51
  • Nicolas Dunand
    Mon, 18 Aug 2014, 8:37 PM
    Blair, as far as I know, "mysql" is not a valid value for $CFG->dbtype (see config-dist.php file). So could you confirm what is the actual value of $CFG->dbtype in your Moodle's config.php?
  • Blair F.
    Wed, 27 Aug 2014, 6:02 AM
    Nicolas, the actual value was mysql. My I.T. guy made the change in our test environment and it fixed the problem with the plugin and didn't seem to have any negative impact, elsewhere. I still can't help but wonder why that value is there in the first place, if it's not right. It makes me nervous making changes at that level. But, hey, that's not your fault! smile
  • Constance Horne
    Wed, 17 Sep 2014, 2:15 AM
    How do I install the tool merge users? I see a lot of files in the download and don't userstand why, because usually a plugin is a single folder that is placed in a location within moodle. This looks like an update to many standard items in moodle, not just a new folder.
  • Nicolas Dunand
    Wed, 17 Sep 2014, 12:54 PM
    Hi Constance,
    When downloading the plugin, you should get a folder named "mergeusers". Simply upload this folder to your Moodle's /admin/tool directory, and then visit Moodle's notifications page to install.
  • David Mudrák
    Wed, 1 Oct 2014, 6:43 AM
    I am happy to announce that this plugin received our spotlight as a Featured plugin for September 2014. Read more at https://moodle.org/mod/forum/discuss.php?d=271187

    Well done Jordi and Nicolas!
  • Nicolas Dunand
    Wed, 1 Oct 2014, 2:26 PM
    Thanks David for the opportunity! Also, thanks for taking the time to review the code and for making suggestions. We'll take this into account and will hopefully release an updated version soon.
  • Jordi Pujol-Ahulló
    Wed, 1 Oct 2014, 3:48 PM
    Thank you so much David! You're very welcome!
  • Jordi Pujol-Ahulló
    Wed, 1 Oct 2014, 3:56 PM
    We have just created an EPIC issue to address all your good feedback (https://github.com/ndunand/moodle-tool_mergeusers/issues/72).

    Thanks a lot!
Please login to post comments