RT::Ex...geUsers(3pm)
π RT::Ex...geUsers(3pm) π
okay bestie, pull up a chair, because we're about to talk about RT::Extension::MergeUsers β a User Contributed Perl Documentation page, no less. she's giving β¨utilitiesβ¨ π
πΈ 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. yes queen, that's the whole range π
β¨ DESCRIPTION β¨
So basically? This RT extension adds a "Merge Users" box to the User Administration page. Which means β hear me out β you can merge the user you are currently viewing with another user on your RT instance. Obsessed. π₯
It also adds MergeInto and UnMerge functions to the RT::User class, so you can programmatically accomplish the same thing from your own code. Main character API energy fr fr. π
And it also provides a version of CanonicalizeEmailAddress, which means all e-mail sent from secondary users is displayed as coming from the primary user. No cap. π
π INSTALLATION π
Be sure to also read "UPGRADING" if you are upgrading. not optional, bestie, it's giving important π¨
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. either way, she's getting added π
Clear your mason cache
rm -rf /opt/rt5/var/mason_data/obj
Restart your webserver π
π« UPGRADING π«
If you are upgrading from 0.03_01 or earlier, you must run bin/rt-update-merged-users. Like, must must. π«
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. π
Good news though: it can be safely run multiple times β it will only create Attributes as needed. slay, idempotent behavior β¨
π 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. π«Ά
π rt-merge-users
A command-line tool to merge one user into another. short, sweet, iconic π
β οΈ 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. thoughtful of her, honestly π
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:
- 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. π
- 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>.
please report them, bestie, they can't fix what they don't know about π
π LICENSE AND COPYRIGHT π
This software is Copyright (c) 2014-2023 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, you ate that π β¨
this was perl v5.36.0 on 2023-10-18, from the RT::Ex...geUsers(3pm) manual β mwah, bye bestie, go merge responsibly π«Άππ¦
π¦ where this page comes from
- ubuntu noble: rt4-extension-mergeusers 1.08-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms