Need some design tips on hidden and public user attributes.

Author Message

Tore Skobba

Friday 12 December 2003 5:11:08 am

Hi all

I have a site where users register themself, furthermore, some data about the users are to be available for all visitors to the site (such as name, picture). I aave a list all students link (where students are the registered users). While other data is to be hidden, such as phone number etc. as this data is only for the administrators of the site. However, the user should himself update this data. As such I have an user class where some attributtes are to be showed to all, while others are not. In addition I would like a dynamic template to show all public student attributes, i.e. using an section going through all attributes and printing them. Hence I need a way of seperating the attributes between hidden and not hidden. Currently I am evaluating several solutions, but these might not be good so I am searching for some more tips:

1: All attributes have an "checkbox" indicating if the attribut is available, then the display section loop does an check on the checkbox so see if it is checked, if yes print the attribute (next in the array)

2: The name of the attribute indicates whereever it is hidden or not, i.e. Name_PUBLIC, Phone_HIDDEN, then I can do a check on the name in my display section loop.

3: All users have a related content object with all the hidden attributes, when editing they are also required to edit the related content object. However, this is not shown when displayed on the main page.

Hope someone has some tips, am I thinking very wrong?

PS: This is not going to be sensitive data, as such whereever some user might be able to view it by playing with the url is okay (as solution 1 and 2 would allow).

Cheers
Tore

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.