Kentico CMS 6.0 Community Site Guide

Enabling public profile fields visibility controls

Enabling public profile fields visibility controls

Previous topic Next topic Mail us feedback on this topic!  

Enabling public profile fields visibility controls

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

You can let users specify who will see particular details on their public profiles. By default, this is enabled for the e-mail field, as you can see in the screenshot below. Using the highlighted radio-buttons, users can make their e-mail address visible to:

 

Nobody - nobody can see the e-mail address

All - everyone including anonymous site visitors can see the e-mail address

Site members - only authenticated site users can see the e-mail address

Friends - only authenticated site users who are among the user's friends can see the e-mail address

 

commguide_clip0068

 

In the following example, you will learn how to let users set the visibility of their full name.

 

User profiles display data stored in the CMS_User system table based on the specified alternative form. In our case, it is the Edit profile (Community) alternative form. We will have to modify it 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 Edit profile (Community) alternative form.

 

commguide_clip0069

 

3. Switch to the Fields tab and select FullName from the list on the left. Check the Allow user to change field visibility check box and switch the value of the Visibility control drop-down list to Visibility (radio buttons - horizontal). Click Save Save field to confirm the changes.

 

commguide_clip0070

 

4. Switch to the Layout tab. Place the cursor to the FullName line, right-click and from the context menu, select Row -> Insert Row After. Type 'Display full name to:' into the first column of the new line. Then place the cursor into the second column, choose FullName from the Available fields list and click the Insert visibility control button. The result should look as in the screenshot below.

 

Click Save to save the changes.

 

commguide_clip0071

 

5. Now if you go to the live site and sign in as some of the sample users (e.g. David with blank password) and go to the profile editing section (click Edit my profile in the Shortcuts menu), you should be able to choose the Full name field visibility, as shown in the screenshot below.

 

commguide_clip0072

 

Further steps: You have learned how to let site users specify who will see their full name. The same way as described above, visibility controls can be added to any other field of their profiles.