Scoop -- the swiss army chainsaw of content management
Front Page Everything News Code Help! Wishlist Project Scoop Sites Dev Notes Latest CVS changes Development Activities
Scoop Box Exchange - Show Box: all_users 1.00

Author: schmolli [Info]


Lists all users. Expanded and modifed from theantix's list_all_users box. [update 2004-05-23: change UI->VARS notation to var(...) notation

Box Code:

# require edit_user privs
return '' unless $S->have_perm('edit_user');
my $notes = $S->var('allow_admin_notes');

my $what = 'u.nickname, u.uid, u.creation_time, u.creation_ip';
$what .= ', u.admin_notes' if ${notes};
my ($rv,$sth) = $S->db_select({
WHAT => "$what",
FROM => 'users u',
ORDER_BY=> "u.uid"
return '' unless $rv;

my $return='<div class="userlist">';
$return .= '<table cellpadding=3 border=0 cellspacing=1>';
$return .= '<tr>';
$return .= '<th>User</th>';
$return .= '<th>Creation Time</th>';
$return .= '<th>Creation IP</th>';
$return .= '<th>Notes</th>' if ${notes};
$return .= '</tr>';

while (my $r = $sth->fetchrow_hashref) {
$return .= '<tr>';
$return .= '<td><a href="|rootdir|/user/uid:' . $r->{uid} . '">' . $r->{nickname} . '</a></td>';
$return .= '<td>' . $r->{creation_time} . '</td>';
$return .= '<td>' . $r->{creation_ip} . '</td>';
$return .= '<td>' . $r->{admin_notes} . '</td>' if ${notes};
$return .= '</tr>';


$return .= '</table>';
$return .= '</div>';

return $return;
Display: Sort:
create account
report bugs
Scoop Administrators Guide
Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Keepers of Lists
Got Lists? We've got over 1800

Make a new account

Hosted by Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest 1999 The Management

create account | faq | search