diff --git a/Topcoder/class.topcoder.plugin.php b/Topcoder/class.topcoder.plugin.php index 7962e57..68dc2c5 100644 --- a/Topcoder/class.topcoder.plugin.php +++ b/Topcoder/class.topcoder.plugin.php @@ -2020,7 +2020,7 @@ function userPhoto($user, $options = []) { $userLink = userUrl($fullUser); $topcoderProfile = TopcoderPlugin::getTopcoderUser($user); - if($topcoderProfile !== null) { + if($topcoderProfile) { $attributes['target'] = '_blank'; $userLink = TopcoderPlugin::getTopcoderProfileUrl($name); $topcoderPhotoUrl = val('PhotoUrl', $topcoderProfile); @@ -2029,12 +2029,14 @@ function userPhoto($user, $options = []) { } } + $isTopcoderAdmin = val('IsAdmin', $topcoderProfile); $photoUrl = isset($photoUrl) && !empty(trim($photoUrl)) ? $photoUrl: UserModel::getDefaultAvatarUrl(); $href = (val('NoLink', $options)) ? '' : ' href="'.url($userLink).'"'; Gdn::controller()->EventArguments['User'] = $user; Gdn::controller()->EventArguments['Title'] =& $title; Gdn::controller()->EventArguments['Attributes'] =& $attributes; + Gdn::controller()->EventArguments['IsTopcoderAdmin'] =$isTopcoderAdmin; Gdn::controller()->fireEvent('UserPhoto'); return ''