X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.profile.php;h=77909bdbb5dedc9d52ea83c853ad096ae98cb444;hb=843a2191e4c76f0beb00c754f06974de76791238;hp=be02e7b88c21e529f17987a1630ce0f58b302155;hpb=d1e6167749fdad08c81e23d09e1bbbf76e3b989b;p=platal.git
diff --git a/plugins/function.profile.php b/plugins/function.profile.php
index be02e7b..77909bd 100644
--- a/plugins/function.profile.php
+++ b/plugins/function.profile.php
@@ -1,6 +1,6 @@
b('link', true);
$with_groupperms = $params->b('groupperms', true);
$user = $params->v('user');
- if (ctype_digit($user)) {
+ if (is_int($user) || ctype_digit($user)) {
$user = User::getWithUID($user);
}
- $name = pl_entities($user->fullName());
+ $name = pl_entities($user->directoryName());
if ($with_sex && $user->isFemale()) {
$name = '•' . $name;
}
@@ -47,7 +47,10 @@ function smarty_function_profile($params, &$smarty)
$name = '';
}
}
- if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin') {
+ if ($user->lost) {
+ $name .= '
';
+ }
+ if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin' && !empty($name)) {
$name = '' . $name . '';
}
return $name;