Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 41 lines (30 sloc) 0.781 kb
d8359ff @BrianAker Fry :)
BrianAker authored
1 #!/usr/bin/perl
2 use Slash;
3 use Slash::Utility;
4 use Slash::DB;
5
6
7 die "usage chkuser [ nickname | email ] \n" unless @ARGV;
8
9 my %opts;
10 $opts{'u'} ||= 'banjo';
11
12 createEnvironment($opts{'u'});
13
14 my $slashdb = getCurrentDB();
15 my $constants = getCurrentStatic();
16
17 my $args = join " ", @ARGV;
18 $args =~ s/'/''/g;
19 $args = "'$args'";
20
21 my $U= $slashdb->sqlSelectHashref("*","users","nickname=".$args)
22 || $slashdb->sqlSelectHashref("*","users","realemail=".$args)
23 || $slashdb->sqlSelectHashref("*","users","uid=".$args);
24
25 if($U) {
26 $$U{bio}=$$U{sig}=undef;
27 foreach ( sort keys %$U ) {
28 if($$U{$_}) {
29 print substr($_,0,15)."\t";
30 $$U{$_}=~s/\n//g;
31 print "\t" if length $_ < 8;
32 print "'".substr($$U{$_},0,255)."'\n";
33 }
34 }
35 } else {
36 print "@ARGV Not found";
37 }
38 print "\n\n";
39
40
Something went wrong with that request. Please try again.