|
||
You can define which information will be displayed on users' public profiles. In the following example, you will learn how to add the User ID field to the public profiles.
User public profiles display information from the CMS_User system table using an alternative form. In our case, it is the Display profile alternative form. We will have to modify the alternative form to achieve the required functionality. For more information about the Alternative forms concept, please refer to the Modules -> Alternative forms chapter of Kentico CMS Developer's Guide.
1. Sign in to Site Manager (login administrator with blank password by default). Go to Development -> System tables and choose to Edit () the User (CMS_User) system table.
2. Switch to the Alternative forms tab and choose to Edit () the Display profile alternative form.
3. Switch to the Fields tab. Select the UserID field from the list on the right and check the Display attribute in the editing form check-box. Click Save to confirm the changes.
4. Now we need to modify the layout of the profile, so switch to the Layout tab. Place the cursor in the empty cell below the FullName row and choose UserID from the Available fields list on the right.
Click the Insert label button. Select the text that was entered and make it bold so that it looks the same as the other labels. Place the cursor into the second column of the row and click the Insert input button.
The result should look as in the screenshot below. Finally, click Save to confirm the changes.
5. Now if you switch to the live site and sign in as some of the sample users (e.g. David with blank password), you should see the UserID field present on their profile, as highlighted in the screenshot below.
Further steps: You have learned how to modify the user public profile. This way, you can add any other field to the profile. You may also try creating your own alternative form and use it for displaying user profiles. The new alternative form needs to be specified in the Form name property of the User public profile web part. You may also try modifying the Edit profile (Community) alternative form the same way. Like this, you can allow users to modify some additional details of their profile on the profile editing page.