public static function getUser($id)
{
$id = (int) $id;
// create user instance
$user = self::get($id);
// no user found, stop here
if (empty($user)) {
return '';
}
// get settings
$nickname = $user['display_name'];
$allowed = BackendAuthentication::isAllowedAction('Edit', 'Profiles');
// get avatar
$avatar = self::getAvatar($id, $user['email']);
// build html
$html = '<div class="dataGridAvatar">' . "\n";
$html .= ' <div class="avatar av24">' . "\n";
if ($allowed) {
$html .= ' <a href="' . BackendModel::createURLForAction('Edit', 'Profiles') . '&id=' . $id . '">' . "\n";
}
$html .= ' <img src="' . $avatar . '" width="24" height="24" alt="' . $nickname . '" />' . "\n";
if ($allowed) {
$html .= ' </a>' . "\n";
}
$html .= ' </div>';
$html .= ' <p><a href="' . BackendModel::createURLForAction('Edit', 'Profiles') . '&id=' . $id . '">' . $nickname . '</a></p>' . "\n";
$html .= '</div>';
return $html;
}