Skip to content

Commit

Permalink
Issue #4217 - incorrect comment avatar.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Nov 28, 2020
1 parent 22653b3 commit 35ad3e7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions e107_core/shortcodes/batch/comment_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,11 @@ function sc_comment_avatar($parm = '')
{
$tp = e107::getParser();

// return $this->var['user_image'];
// $url = $tp->thumbUrl($this->var['user_image']);
// $text = $tp->parseTemplate("{USER_AVATAR=".vartrue($this->var['user_image'],USERIMAGE)."}");
// $text = $tp->parseTemplate("{USER_AVATAR=".$this->var['user_id']."}");

// Posting a new comment (check that it is not an existing comment by anonymous user) - #3813 & 3829
if($this->var['comment_author_id'] != '0' && USERID)
// https://github.com/e107inc/e107/issues/4217
if(!isset($this->var['comment_author_id']) && USERID) // assumes we are writing a new comment, not displaying an existing one.
{
$userdata = e107::user(USERID);
$userdata = e107::user(USERID);
$this->var = array_merge($this->var, $userdata);
}

Expand All @@ -134,6 +130,9 @@ function sc_comment_avatar($parm = '')
$text .= '</div>';
$text .= '</div>';

/* unset($this->var['user_prefs']);
$text .= print_a($this->var,true);*/

return $text;
}

Expand Down

0 comments on commit 35ad3e7

Please sign in to comment.