Can't set user to Privilege

[Excuse my duplicate posting. There is a mail gateway out there that is apparently using
snail-mail as it’s transport agent! It will come thru, eventually.]


I’m modifying my existing command-line utility that adds users
to RT based upon information from our Corporate DB. The modification
is to be able to toggle or set/clear the user Privilege.

Below is a code fragment to demostrate my problem:


$priv_rights = 1;
$phandle = "pem";
my $UserObj = new RT::User(RT::SystemUser);
     if( !$UserObj->Load($phandle) ) {
             print "Can not modify non-existant user: $phandle\n";
     print "Loaded user: $UserObj->Id()\n";

# for existing users, we update Privileged
	my  ($code, $msg) = $UserObj->SetPrivileged($priv_rights);
	print "RC:$code - $msg\n";

When I execute the above, I’m getting:

Loaded user: RT::User=HASH(0xb144c0)->Id()

rt.log entry:
[Thu Jul 29 04:49:36 2004] [warning]: Deep recursion on subroutine “RT::ACE::_Va
lue” at /bld/RT/perl/lib/site_perl/5.8.4/DBIx/SearchBuilder/ line 409.

I then have to interupt it as it appears to go into a loop.

Can anyone tell me what I’m doing wrong? I have a couple hundred
users needing modification to Privilege and I really don’t want
to be forced to use GUI/Web to perform this operation.