<div dir="ltr">Call `print <span style="font-family:arial,sans-serif;font-size:13px">$RT_enabled_users->BuildSelectQuery, "\n";`, check SQL manually and it is correct then move to Next function.</span></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Sep 2, 2013 at 6:04 PM, Nathan Cutler <span dir="ltr"><<a href="mailto:presnypreklad@gmail.com" target="_blank">presnypreklad@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Greetings:<br>
<br>
RT 4.0.17. In the web UI, when I list all enabled users by selecting<br>
'%' I get a list of about 152 users (approximately). Now, I have<br>
written a Perl script that is supposed to list all enabled RT users.<br>
When I run it, it finds 147 users and lists them in alphabetical<br>
order. But approximately 5 users at the end of the alphabet ('Name'<br>
starting with 'v', 'w', 'x', 'y', or 'z') are missing. For the life of<br>
me I can't figure out why. Any ideas?<br>
<br>
use strict;<br>
use warnings;<br>
<br>
use RT;<br>
use RT::User;<br>
use RT::Users;<br>
<br>
BEGIN {<br>
RT->LoadConfig;<br>
RT->Init;<br>
}<br>
<br>
my $RT_enabled_users = RT::Users->new($RT::SystemUser);<br>
$RT_enabled_users->LimitToEnabled;<br>
<br>
my $loop_count = 0;<br>
while (my $current_user = $RT_enabled_users->Next) {<br>
<br>
$loop_count += 1;<br>
<br>
my $uid = $current_user->Name;<br>
my $real_name = $current_user->RealName;<br>
my $rt_email = $current_user->EmailAddress;<br>
<br>
print "$loop_count: '$uid' -- $real_name -- $rt_email\n";<br>
<br>
}<br>
<br>
print "Loop count: $loop_count\n";<br>
<br>
Thanks alot,<br>
Nathan<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards, Ruslan.
</div>