[Rt-commit] rt branch, 4.0/check-user-object-in-shredder, created. rt-4.0.20-35-ga315627
Jim Brandt
jbrandt at bestpractical.com
Tue Jun 10 15:20:19 EDT 2014
The branch, 4.0/check-user-object-in-shredder has been created
at a315627dbaf5a6af2820c310177396847e0af656 (commit)
- Log -----------------------------------------------------------------
commit a315627dbaf5a6af2820c310177396847e0af656
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue Jun 10 15:14:23 2014 -0400
Confirm user object when checking _WithoutTickets
When shredding users, check the user object before processing
_WithoutTickets. If it's not properly loaded, return to allow
FilterWithoutTickets to skip that user and continue processing.
This should only happen in strange cases, like using the
MergeUsers extension where one user record can try to load
another user record that shredder has already deleted.
diff --git a/lib/RT/Shredder/Plugin/Users.pm b/lib/RT/Shredder/Plugin/Users.pm
index 5b7ccae..f763246 100644
--- a/lib/RT/Shredder/Plugin/Users.pm
+++ b/lib/RT/Shredder/Plugin/Users.pm
@@ -241,6 +241,7 @@ sub FilterWithoutTickets {
sub _WithoutTickets {
my ($self, $user) = @_;
+ return unless $user and $user->Id;
my $tickets = RT::Tickets->new( RT->SystemUser );
$tickets->{'allow_deleted_search'} = 1;
$tickets->FromSQL( 'Watcher.id = '. $user->id );
-----------------------------------------------------------------------
More information about the rt-commit
mailing list