RT::Ex...geUsers(3pm)

πŸ“¦ version 1.06, in ubuntu jammy

πŸ’– RT::Extension::MergeUsers β€” the manual, but make it slay πŸ’–

okay bestie, this is the page for RT::Extension::MergeUsers, from the User Contributed Perl Documentation manual, section 3pm. yes it's a Perl module page and yes it's about smashing two users together into one. iconic behaviour fr fr. 🫢


✨ NAME ✨

RT::Extension::MergeUsers β€” Merges two users into the same effective user πŸ’…


🌈 RT VERSION 🌈

Works with RT 4.0, 4.2, 4.4, 5.0. periodt. no cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

This RT extension adds a "Merge Users" box to the User Administration page, which lets you merge the user you're currently looking at with another user on your RT instance. literally drag-and-drop energy but for accounts πŸ’–

It also adds MergeInto and UnMerge functions to the RT::User class, so you can programmatically do the exact same thing straight from your own code. main character API moment ✨

It also provides a version of CanonicalizeEmailAddress, which means all e-mail sent from secondary users shows up as coming from the primary user. obsessed. πŸ‘‘


πŸŽ€ INSTALLATION πŸŽ€

Be sure to also read "UPGRADING" if you are upgrading. don't skip it bestie, i'm begging πŸ™ˆ

  • perl Makefile.PL
  • make
  • make install
    • May need root permissions πŸ‘‘
  • Edit your /opt/rt5/etc/RT_SiteConfig.pm
    • If you are using RT 4.2 or greater, add this line:
Plugin('RT::Extension::MergeUsers');
  • For RT 4.0, add this line:
Set(@Plugins, qw(RT::Extension::MergeUsers));
  • or add RT::Extension::MergeUsers to your existing @Plugins line.
  • Clear your mason cache
rm -rf /opt/rt5/var/mason_data/obj
  • Restart your webserver πŸ”₯

🌸 UPGRADING 🌸

If you're upgrading from 0.03_01 or earlier, you must run bin/rt-update-merged-users. This script will create MergedUsers Attributes so RT can know when you're looking at a user that other users have been merged into.

If you don't run this script, you'll have issues unmerging users. not a vibe. not cute. run the script. 😭

It can be safely run multiple times β€” it will only create Attributes as needed. so like, zero stress 🧚


πŸ’œ UTILITIES πŸ’œ

rt-clean-merged-users

When a user with another user merged into it is shredded, the attributes on that user are also shredded β€” but the merged user will remain, along with attributes that may point to the now missing user id. This script cleans up attributes if the merged-into user record is now gone. These users will then be converted back to regular unmerged users. spring cleaning but make it database ✨

rt-merge-users

A command-line tool to merge one user into another. πŸ’…


⭐ CAVEATS ⭐

RT::Shredder and Merged Users

Merging a user effectively makes it impossible to load the merged user directly. Attempting to access the old user resolves to the merged-into user. Because of this, MergeUsers has some extra code to help RT::Shredder clean up these merged records, so we avoid leaving merged user records in the DB while removing the user they were merged into.

When running RT::Shredder on a user record with other users merged into it, the merged users are Unmerged before the initial user record is shredded. There are two options to handle these newly unmerged users:

  1. Re-run your shredder command with the same or similar options. The unmerged user records will now be accessible and, depending on your shredder options, they will likely be shredded on the second run. If you have multiple layers of merged users, you may need to run shredder multiple times. layers on layers on layers πŸ’€
  2. MergeUsers will log the unmerged users at the "info" level so you can pull the user ids from the log and shred them manually. This is most likely to be useful if you are shredding one specific user (and all merged accounts).

πŸ‘‘ AUTHOR πŸ‘‘

Best Practical Solutions, LLC <modules@bestpractical.com> πŸ’–


πŸ› BUGS πŸ›

All bugs should be reported via email to

L<bug-RT-Extension-MergeUsers@rt.cpan.org|mailto:bug-RT-Extension-MergeUsers@rt.cpan.org>

or via the web at

L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-MergeUsers>

This software is Copyright (c) 2014-2020 by Best Practical Solutions

This is free software, licensed under:

The GNU General Public License, Version 2, June 1991

and that's the whole page bestie, we ate and left no crumbs πŸ“βœ¨

cute lil sign-off: this was generated by perl v5.32.1 on 2021-02-27, and the manual name for this page is RT::Ex...geUsers(3pm) β€” iykyk πŸ’…πŸ’œ

πŸ“¦ where this page comes from