[rt-users] Shredder Error
Mathew Snyder
theillien at yahoo.com
Sat Jun 30 00:40:30 EDT 2007
I'm trying to remove users using the methods within Shredder. After gathering
all the email addresses I need to remove I call Shredder like such:
RTx::Shredder::Init( force => 1 );
my $shredder = new RTx::Shredder(RT::SystemUser);
my $resolver = new RTx::Shredder::Plugin::Users(RT::SystemUser);
$resolver->SetResolver(Shredder => 10);
$shredder->PutResolver($resolver);
if ($ans =~ m/^(y|yes)$/i){
my ($fname, $fh) = $shredder->SetFile( FromStorage => 0, FileName =>
'/usr/local/rt-3.6.1/var/data/RTx-Shredder/Shredder-Users_XXXX.sql' );
foreach my $email (@emails){
my $user = new RT::User(RT::SystemUser);
$user->LoadByEmail($email);
next unless $user->id;
$shredder->PutObject(Object => $user);
}
$shredder->WipeoutAll;
}else{
exit;
}
Using this gives me
Odd number of elements in anonymous hash at
/usr/local/rt-3.6.1/local/lib/RTx/Shredder/Plugin/Base.pm line 23.
I looked at the perldocs and verified that Objects => $user is a valid value.
However, I am wondering if it should be something like $user->EmailAddress or
something.
Can someone shed some light on this for me?
Thanks
Mathew
--
Keep up with me and what I'm up to: http://theillien.blogspot.com
More information about the rt-users
mailing list