X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.profile.php;fp=plugins%2Ffunction.profile.php;h=3a05b6148aa7e882489673bc409e19f3c0f7825e;hb=e019ea3dae21f3c0794b0277c1fe9cefaf7e1114;hp=f3a7fb1e3356f24536aad9b7c3cc3fbd87338a86;hpb=59db57ab4f882ddb1a97128434da07954bcd52e1;p=platal.git diff --git a/plugins/function.profile.php b/plugins/function.profile.php index f3a7fb1..3a05b61 100644 --- a/plugins/function.profile.php +++ b/plugins/function.profile.php @@ -25,13 +25,18 @@ function smarty_function_profile($params, &$smarty) $with_promo = $params->b('promo', false) || $params->b('cat', false); $with_sex = $params->b('sex', true); $with_link = $params->b('link', true); + $with_dir = $params->b('directory', true); $with_groupperms = $params->b('groupperms', true); $user = $params->v('user'); if (is_int($user) || ctype_digit($user)) { $user = User::getWithUID($user); } - $name = pl_entities($user->directoryName()); + if ($with_dir) { + $name = pl_entities($user->directoryName()); + } else { + $name = pl_entities($user->fullName()); + } if ($with_sex && $user->isFemale()) { $name = '•' . $name; }