Modifying user profiles

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

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 Module 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 (Edit) the User (CMS_User) system table.

 

commguide_clip0059

 

2. Switch to the Alternative forms tab and choose to Edit (Edit) the Display profile alternative form.

 

commguide_clip0064

 

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 OK to save the changes.

 

commguide_clip0065

 

4. Now we need to modify the layout of the profile, so switch to the Layout tab. Place the cursor in the first column of the empty line below the FullName line 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 to the second column of the line and click the Insert input button.

 

The result should look as in the screenshot below. Finally, click Save to save the changes.

 

commguide_clip0066

 

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.

 

commguide_clip0067

 

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.

 

Page url: http://devnet.kentico.com/docs/5_5r2/communitysiteguide/index.html?modifying_user_profiles.htm