Kentico CMS 7.0 Community Site Guide

Enabling public profile field visibility controls

Enabling public profile field visibility controls

Previous topic Next topic Mail us feedback on this topic!  

Enabling public profile field 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 - the e-mail address cannot be seen by anyone (only by the profile's owner).

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 a blank password by default). Go to Development -> System tables and Edit (Edit) the User (CMS_User) system table.

 

commguide_clip0059

 

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

 

commguide_clip0069

 

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

 

commguide_clip0070

 

4. Switch to the Layout tab. Place the cursor on the row containing the FullName field, right click it and select the Row -> Insert Row After option from the context menu. Type Display full name to: into the first column of the new row. 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 Save to save the changes.

 

commguide_clip0071

 

5. Navigate to CMS Desk and select the Members -> Management document in the content tree. Open the Design tab and Configure (Configure) the MyAccount web part. Make sure that the Allow user to edit field visibility property is checked (the property is enabled by default on the sample Community site).

 

commguide_clip0410

 

Click OK.

 

6. Now if you go to the live site and sign in as one of the sample users (e.g. David with a 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. You can add visibility controls to any other profile fields using the same approach.