I've created a simple script and placed it in local/sbin.  When I run it I get 
"Can't locate
RT/Users.pm in @INC...".  How do I add RT to the list of @INC directories?

Of course, my perl skills are still rudimentary at best so I may have it all 
wrong:
#!/usr/bin/perl
use RT::Users;
use strict;
use warnings;

my $users = new RT::Users(RT_System);
$users->LimitToPrivileged;
print $users;

Mathew

Roy El-Hames wrote:
> Mathew;
> Querying the database will be complex involving Users and Principals
> tables and *I think* you may need to also include the Groups table, will
> be much simpler to use the RT  API , the function you need will be
> somthing like:
> use RT::Users
> my $users = new RT::Users(RT_System);
> $users->LimitToPrivileged;
> (look in (Admin/Users/index.html)
> Regards;
> Roy
> 
> Mathew Snyder wrote:
>> I'm trying to get a list of all privileged users in our system.  Which
>> table.field should I be querying against?
>>
>>
>> Mathew
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com
>> Commercial support: [EMAIL PROTECTED]
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
>> Buy a copy at http://rtbook.bestpractical.com
>>
>>   
> 
> 
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to