cogDisplay the avatar of a user, or a standard image noavatar.png if the user has no avatar.
TypeDoc (Velocity Macro)
Developed by

XWiki Development Team

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Enterprise, XWiki Enterprise Manager

Description

A user's avatar is a url that is defined by editing a user's profile. This currently must be done through the object editor as the avatar text field is not shown in the standard form.

Since XWiki Enterprise 2.5 four new velocity macros have been added for making it easier to display avatars. See release notes.

Usage

#useravatar($username)

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
usernamenoa stringnoneXWiki user of the form "XWiki.UserName"

Example

The avatar of the user that's viewing this page:

#useravatar($context.user)

Result

Here is an example for a user without an avatar:

userAvatar.png

Tags: users image
Created by LuisArias on 2007/04/08 10:39
    

Get Connected