<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$with_link = $params->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;
}
$name = '<a href="profile/' . $profile->hrid() . '" class="popup2">' . $name . '</a>';
}
}
- if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin') {
+ if ($user->lost) {
+ $name .= ' <a href="https://www.polytechnique.org/marketing/broken/' . $user->hruid . '"><img src="images/icons/error.gif" alt="Patte cassée" /></a>';
+ }
+ if ($with_groupperms && $user instanceof User && $user->group_perms == 'admin' && !empty($name)) {
$name = '<strong>' . $name . '</strong>';
}
return $name;