Hello I consistently keep getting this error : Couldn't wipeout object: at
/opt/prj/rt/rt3/local/lib/RTx/Shredder.pm line 427.
At the end of this mail is my subroutine -
If I change the Wipeout to WipeoutAll , it just takes on forever at that
statement.
Let me know if you have any other logic to delete user accounts from a perl
script.
Please Help,
Thanks
-Ashish
sub delete_user {
# Grab the user id
my $id = shift;
# Form an RT::User object string for the user
my $object_string = 'RT::User-' . $id;
# Create a single item array with the object string
my @users_to_delete = ($object_string);
# Create a shredder object and pass it the array
my $shredder = new RTx::Shredder( force => 1 );
$shredder->PutObjects( Objects => \...@users_to_delete );
# Shred the user
eval {
$shredder->Wipeout
};
if ( $@ ) {
return (-1, "Failed to delete user with id '$id': $@");
}
return (1, "User with id '$id' deleted successfully.\n");
}
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [email protected]
2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com