Version 9.1 by Vincent Massol on 2011/08/24 21:18

cogDisplays the avatar of a user, or a standard image noavatar.png if the user has no avatar
Typejavamacro
Category
Developed byUnknown
Rating
0 Votes
LicenseUnknown

Description

Displays the avatar of a user, or a standard image noavatar.png if the user has no avatar. A user's avatar is a url that is defined by editing a user's profile.

Usage

{{useravatar username="<username>" /}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
usernamenoa stringnoneXWiki user of the form "XWiki.UserName". Starting with XWiki 3.2 it's now possible to pass just the shortname (i.e. username without the "XWiki." space prefix).
widthyesan integerimage's natural widthThe width of the avatar image
heightyesan integerimage's natural widthThe width of the avatar image

Example

The avatar of some XWiki.JohnDoe user:

{{useravatar username="XWiki.JohnDoe" width="40" height="40"/}}

Result

noavatar.png

Get Connected