Share » Forums » Setup & design » Displaying specific folders to users...

Displaying specific folders to users of a minimum age

Displaying specific folders to users of a minimum age

Monday 04 April 2011 10:54:56 am - 3 replies

Author Message

Gaetano Giunta

Tuesday 05 April 2011 1:06:37 am

Not a detailed walkthrough, but here you go:

1. take care about the datatype used for 'date of birth'. Standard date datatype cannot go below 1/1/1970, so if your website has also older people registered, you need a custom datatype (there is an extension or two on projects.ez.no with that)

2. you should create two roles, and divide users in two groups, each with one role assigned. Then move boys in group A, with role 'boys', and kids to group B, with role 'kids'. Assign read different read permissions to kids and boys groups.

3. Use the workflow system to make sure that when accounts are created, the user is put in the proper group depending on his age (unless you do this manually)

4. Set up a cronjob that runs once a day and checks if kids have become old enough to be migrated to boys

Principal Consultant International Business
Member of the Community Project Board

Andy Woods

Tuesday 05 April 2011 11:54:21 am

Thanks Gaetano,

That looks like a good plan.

Can you tell me the table and field I need to update to change the user's group please?

Thanks,

Andy

Gaetano Giunta

Wednesday 06 April 2011 1:52:03 am

To change a group that a user is in I recommend you do not try to access the db directly, but use the eZP php api dealing with content objects. The operation you want to do is move a node.

Principal Consultant International Business
Member of the Community Project Board

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu