b('promo', false);
$with_sex = $params->b('sex', true);
$with_link = $params->b('link', true);
$with_groupperms = $params->b('groupperms', true);
$user = $params->v('user');
if (ctype_digit($user)) {
$user = User::getWithUID($user);
}
$name = pl_entities($user->fullName());
if ($with_sex && $user->isFemale()) {
$name = '•' . $name;
}
if ($with_promo) {
$promo = $user->promo();
if ($promo) {
$name .= ' (' . pl_entities($promo) . ')';
}
}
if ($with_link) {
$profile = ($user instanceof Profile) ? $user : $user->profile();
if ($profile) {
$name = '';
}
}
if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin') {
$name = '' . $name . '';
}
return $name;
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
?>