XWiki Enterprise 8.4.4 Documentation » XWiki Applications Overview » Customize the User Profile Sections

Customize the User Profile Sections

An administrator can choose which information is shown in the user profile tab. For this purpose, the "User Profile" application allows administrators to decide which fields of the XWiki.XWikiUsers class to display. 

Click the DrawerMenuIcon.png button which opens the drawer menu, then click on "Administer Wiki".

AdministerWikiMenu.png

In the wiki preferences page, click on "User Profile" from the vertical menu to the left.

UserProfileAdminSection.png

Choose Which Sections to Display

In the text-box below "Section IDs" you can enter a space or newline separated list of section IDs to be displayed in the user profile. The IDs available by default are:

  • personal : the "First Name", "Last Name", "Company" and "Comment" subsections
  • contact : the "Email", "Phone" and "Address" subsections
  • links : the "Blog" and "Blog Feed" subsections

SectionIDs.png

Customize the "Personal Information" Section

You may choose which personal information to display by entering a space or newline separated list of XWiki.XWikiUsers properties in the text-box below "Section Properties". The values listed by default are:

  • first_name
  • last_name
  • company
  • comment

PersonalInformationSection.png

You may also use an optional micro-formats class to prefix the property name (e.g.: given-name:first_name).

Customize the "Contact Information" Section

Just like for the above section, you can choose which information to display by entering a space or newline separated list of XWiki.XWikiUsers properties in the corresponding text-box. There are 3 default options available: 

  • email
  • phone
  • address

You may also use micro-formats class to prefix the property name (e.g.: tel:phone).

ContactInformationSection.png

Customize the "External Links" Section

The values listed by default in this section are:

  • blog
  • blogfeed

ExternalLinksSection.png

The XWiki.XWikiUsers class properties can be prefixed using a micro-formats class.

Modify the Section ID

You may change the section ID by entering it in the corresponding text-box. 

ModifiedSectionID.png

The name you specify in the "Section ID" field (without containing any white spaces) must be the same as the one from the "Section IDs" text-box. 

ModifiedSectionID2.png

Add a Section

In the User Profile administration page, go to "All sections" and click on the "Add" link. 

AddSectionLink.png

Next, go to the bottom of the page and you will notice 3 new corresponding "Section ID", "Section Name" and "Section Properties" fields. 

NewSection.png

The section properties must exist in the XWiki.XWikiUsers class which is available at /xwiki/bin/edit/XWiki/XWikiUsers?editor=class.

Finally, you need to specify the new section ID in the "Section IDs" text-box.

AddNewIMSectionID.png

Click on "Save" to apply the changes, then go to your user profile to see the new "IM Information" section displayed under "External Links".

NewSectionAdded.png

To edit the subsection, just click on the yellow pen icon located at the top of the user profile page.

NewSectionEdit.png

Remove a Section

Go to the User Profile administration page and click on the corresponding "Remove" link located to the right of the section. 

Extend the Class "XWiki.XWikiUsers"

When customizing the user profile sections, you are not limited to the properties that already exist in the "XWiki.XWikiUsers" class. It it possible for you to extend the class then to display the new sections in the user profile. To do so, navigate to the page "XWiki.XWikiUsers" and edit it in "Class" mode.

Supposing you need to add a section named "Job Information" which will display the manager and the contract type of each employee, you will need:

  • a property of type "List of Users" in order to select the name of the manager from the existing wiki users

    AddListOfUsersProperty.png

    In case the employee is a member of several teams and he/she has more than one manager, just check the "Multiple select" option. More information regarding the User Picker is available in the documentation about how to edit a group.

  • a "Static List" property with the following possible values: "Full-time" and "Part-time"

    AddStaticListProperty.png

After saving the class page, go to the User Profile administration and create a new section named "Job Information" with the "job_information" ID as explained in the above section. Finally, add the new "manager" and "contract" section properties,

AddNewSectionProperties.png

specify the "job_information" ID in "Section IDs"

AddNewSectionID.png

and click on "Save". The new section will then appear in the user profile. 

NewSectionUserProfile.png

  

Search this space