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.01

Author: schmolli [Info]

Description:

Lists all users. fields include username/uid, group, creation time/ip, realemail, and admin notes.

Box Code:

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

my $what = 'nickname,uid,creation_time,creation_ip,perm_group,realemail';
$what .= ',admin_notes' if ${notes};
my ($rv,$sth) = $S->db_select({
WHAT => "$what",
FROM => 'users',
ORDER_BY=> "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>Group</th>';
$return .= '<th>Creation Time</th>';
$return .= '<th>Creation IP</th>';
$return .= $notes ? '<th>Email/Notes</th>' : '<th>Email</th>';
$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->{perm_group} . '</td>';
$return .= '<td>' . $r->{creation_time} . '</td>';
$return .= '<td>' . $r->{creation_ip} . '</td>';
$return .= '<td>' . '<i>' . $r->{realemail} . '</i>' . '<br>';
$return .= $r->{admin_notes} if $notes;
$return .= '</td>';
$return .= '</tr>';
};

$sth->finish();

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

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

Scoop Site Scroller: Get one yourself!
Satanosphere
/* You are not expected to understand this. */

Login
Make a new account
Username:
Password:

Hosted by ScoopHost.com 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