File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2020,7 +2020,7 @@ function userPhoto($user, $options = []) {
2020
2020
2021
2021
$ userLink = userUrl ($ fullUser );
2022
2022
$ topcoderProfile = TopcoderPlugin::getTopcoderUser ($ user );
2023
- if ($ topcoderProfile !== null ) {
2023
+ if ($ topcoderProfile ) {
2024
2024
$ attributes ['target ' ] = '_blank ' ;
2025
2025
$ userLink = TopcoderPlugin::getTopcoderProfileUrl ($ name );
2026
2026
$ topcoderPhotoUrl = val ('PhotoUrl ' , $ topcoderProfile );
@@ -2029,12 +2029,14 @@ function userPhoto($user, $options = []) {
2029
2029
}
2030
2030
}
2031
2031
2032
+ $ isTopcoderAdmin = val ('IsAdmin ' , $ topcoderProfile );
2032
2033
$ photoUrl = isset ($ photoUrl ) && !empty (trim ($ photoUrl )) ? $ photoUrl : UserModel::getDefaultAvatarUrl ();
2033
2034
$ href = (val ('NoLink ' , $ options )) ? '' : ' href=" ' .url ($ userLink ).'" ' ;
2034
2035
2035
2036
Gdn::controller ()->EventArguments ['User ' ] = $ user ;
2036
2037
Gdn::controller ()->EventArguments ['Title ' ] =& $ title ;
2037
2038
Gdn::controller ()->EventArguments ['Attributes ' ] =& $ attributes ;
2039
+ Gdn::controller ()->EventArguments ['IsTopcoderAdmin ' ] =$ isTopcoderAdmin ;
2038
2040
Gdn::controller ()->fireEvent ('UserPhoto ' );
2039
2041
2040
2042
return '<a title=" ' .$ title .'" ' .$ href .attribute ($ attributes ).'> '
You can’t perform that action at this time.
0 commit comments