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: user_email_lookup 1.00

Author: rusty [Info]

Description:

Enter an email address, look up a username. Designed for the admin tool box. empty box is a box with just |content| as its contents.

Box Code:

return '' unless ($S->have_perm('edit_user'));
my $email = $S->cgi->param('email');
my $vars = $S->cgi->Vars();
my $args;

foreach my $key (keys %{$vars}) {
next unless ($key eq 'op' or
$key eq 'tool' or
$key eq 'sid' or
$key eq 'page' or
$key eq 'cid' or
$key eq 'pid' or
$key eq 'qid');
$args .= qq{
<INPUT TYPE="hidden" NAME="$key" VALUE="$vars->{$key}">};
}
my $ret;
if ($email) {
my $q_email = $S->dbh->quote($email);
my ($rv, $sth) = $S->db_select({
WHAT => 'nickname',
FROM => 'users',
WHERE => qq{realemail = $q_email OR origemail = $q_email}
});

my $user = $sth->fetchrow();
$sth->finish();
$user = 'none found' unless $user;

$ret = qq{
|norm_font|
Email: <b>$email</b><br>
User: <b>$user</b>
|norm_font_end|};
}

$ret .= qq{
<br>
<FORM ACTION="|rootdir|/" METHOD="POST">
$args
|norm_font|Lookup user by email:<br>
<small><input type="text" size="10" name="email">
<input type="submit" VALUE="Go">
|norm_font_end|
</FORM>};

return {content => $ret};
Display: Sort:
Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Scoop
The swiss army chainsaw of Content Managment.

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