[rt-users] How Can I Grow A Set Of Users
Todd Wade
todd at bestpractical.com
Wed May 27 11:22:31 EDT 2015
On 5/26/15 12:08 PM, Al Joslin wrote:
> I need to assemble a set of users from a list of user Ids
>
> # gives me a list of _all_ the users
> $users = RT::Users->new($session{'CurrentUser'});
>
> # how can I add User elements to the User list ?
This script worked for me, outputs the Name field for each record in the
VALUE array:
use warnings;
use strict;
use RT -init;
my $users = RT::Users->new( RT->SystemUser );
$users->Limit(
FIELD => 'id',
OPERATOR => 'IN',
VALUE => [ 6, 12, 1 ],
);
while (my $user = $users->Next ) {
print $user->Name, "\n";
}
More information about the rt-users
mailing list