Skip to content

Commit

Permalink
(Bug 4654) Additional ?user=parameter for supporthelps
Browse files Browse the repository at this point in the history
Debugging aid.
  • Loading branch information
afuna committed Sep 23, 2012
1 parent 653f6c8 commit c47c6af
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion htdocs/tools/endpoints/getuserpics.bml
Expand Up @@ -17,15 +17,23 @@ _c?>
use strict;
use JSON;

use vars qw( %GET );

my $err = sub {
my $msg = shift;
return JSON::objToJson({
'alert' => $msg,
});
};

my $remote = LJ::get_remote();

my $alt_u;
$alt_u = LJ::load_user( $GET{user} )
if $GET{user} && $remote->has_priv( "supporthelp" );

# get user
my $u = LJ::get_remote()
my $u = ( $alt_u || $remote )
or return $err->("Sorry, you must be logged in to use this feature.");

# get userpics
Expand Down

0 comments on commit c47c6af

Please sign in to comment.