private function fetchUserDisplayName(PFUser $user) { $user_helper = new UserHelper(); $name = $this->hp->purify($user_helper->getDisplayNameFromUser($user)); $user_id = $this->getId(); $html = '<div class="realname" title="' . $name . '" data-user-id = "' . $user_id . '" >'; $html .= $name; $html .= '</div>'; return $html; }
/** * Display the html code for this users's avatar * * @return string html */ public function fetchHtmlAvatar() { $purifier = Codendi_HTMLPurifier::instance(); $user_helper = new UserHelper(); $title = $purifier->purify($user_helper->getDisplayNameFromUser($this)); $user_id = $this->getId(); $html = '<div class="avatar" title="' . $title . '" data-user-id = "' . $user_id . '" >'; $url = $this->getAvatarUrl(); if ($url) { $html .= '<img src="' . $url . '" />'; } $html .= '</div>'; return $html; }