Display user contact details using a contact card-style layout.
Description
This recipe uses a combination of the Reporting Plugin and the {float} macro from the Composition Plugin to display a flexible set of contact information for registered users.
First, we start by selecting the report generator style. In this case, since we'll be mixing in {float} we'll use the report-block generator:
{report-block}
Next, we're reporting on users, so we'll use the user-reporter to create a list. And since we're just listing all users, we wont add any filters such as group membership or the like. We will sort by the user's full name however, specifying the "user:full name" key from the User Supplier:
Now, open the {float} macro, floating to the left:
{float:left}
Now, let's display the user's personal picture (reduced to 16x16) and their full name. Also, the name should link to the user's profile, so we'll set 'link' to true:
Lastly, we'll list their email address. Note, however, that depending on the server's settings, users email addresses may be restricted or masked, so we'll also provide a default message of 'Unavailable' for cases where the current user doesn't have permission to view other people's email addresses:
Can I use this to just show the currently logged in user details?
Hullo? <echo!>
Add the user-filter to the user-reporter:
{user-filter:users=@self}
See: http://www.customware.net/repository/display/AtlassianPlugins/user-filter
Updated by Alpha Tester
Dec 17, 2008 02:41
This doesn't appear to work - am getting all users listed:
{report-block} {user-reporter} {user-filter:users=@authenticated} {user-reporter} {report-body} {report-image:user:picture|width=16px|height=16px} *{report-info:user:full name|link=true}* *User ID:* {report-info:user:name} *Email:* {report-info:user:email|link=true|default=_Unavailable_} {report-body} {report-block}Have also tried
{user-filter:users=+@authenticated}Am I doing something daft?