$this->out->elementStart('a', $attrs);
$this->showAvatar();
$this->out->text(' ');
- $this->out->element('span',array('class' => 'fn'),
- $this->profile->getBestName());
+ $user = common_current_user();
+ if (!empty($user) && $user->streamNicknames()) {
+ $this->out->element('span',array('class' => 'fn'),
+ $this->profile->nickname);
+ } else {
+ $this->out->element('span',array('class' => 'fn'),
+ $this->profile->getBestName());
+ }
$this->out->elementEnd('a');
$this->out->elementEnd('span');
$groups = $this->getGroups();
+ $user = common_current_user();
+
+ $streamNicknames = !empty($user) && $user->streamNicknames();
+
foreach ($groups as $group) {
$ga[] = array('href' => $group->homeUrl(),
'title' => $group->nickname,
'class' => 'addressee group',
- 'text' => $group->getBestName());
+ 'text' => ($streamNicknames) ? $group->nickname : $group->getBestName());
}
return $ga;
$replies = $this->getReplyProfiles();
+ $user = common_current_user();
+
+ $streamNicknames = !empty($user) && $user->streamNicknames();
+
foreach ($replies as $reply) {
$pa[] = array('href' => $reply->profileurl,
'title' => $reply->nickname,
'class' => 'addressee account',
- 'text' => $reply->getBestName());
+ 'text' => ($streamNicknames) ? $reply->nickname : $reply->getBestName());
}
return $pa;