Description:
This box just very simply lists all of the users, ordered by user id
Box Code:
#return nothing for non-admins
return '' unless $S->have_perm('story_admin');
my ($rv,$sth) = $S->db_select({
WHAT => 'u.nickname, u.uid',
FROM => 'users u',
ORDER_BY=> "u.uid"
});
my $return='<div class="userlist">';
if ( $rv ) {
while (my $r = $sth->fetchrow_hashref) {
$return .= '<a href="/scoop/user/uid:' . $r->{uid} . '">' . $r->{nickname} . ' <br />';
};
}
$sth->finish();
$return .= '</div>';
return $return ;
|