Forums / Developer / Automaticly adding users to groups depending on atttributes

Automaticly adding users to groups depending on atttributes

Author Message

Norman Leutner

Wednesday 11 January 2006 4:23:05 pm

In a project I have two different registration forms.
( lets call them users and editiors )

Now I want to add them automaticly to different user-groups.
The group assignment should depend on a user-attribute.

Is there a standard ez functionality for that behavior?

Thanks in advance for any sugesstion...

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Bruce Morrison

Wednesday 11 January 2006 5:32:38 pm

Hi Norman

I don't believe there is an "out of the box' way to do this. One way of doing it would be to create a workflow that moved the user into the correct group before it was published.

HTH

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Norman Leutner

Thursday 12 January 2006 3:49:52 am

I'm not very familiar with workflows until now...

Can you give me a short "howto" for that behavior?

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Tore Skobba

Thursday 12 January 2006 5:59:59 am

Hi Norman

You must make an new workflow and add an new workflow event, set it to run on after publish. Basically the workflow event (which you must make) must.

Fetch the object currently published
Check the class id, if class id is user class id then
Check the user attribute which controlls to which user group the user go to
Then move the user object to the correct user group

See http://ez.no/products/ez_publish_cms/documentation/building_an_ez_publish_site/the_guestbook/creating_a_workflow on how to add an workflow. I advise you to check out other customized workflows on how to make one yourself.

Cheers
Tore

Norman Leutner

Monday 16 January 2006 5:33:32 am

Thanks Tore,

I'll give it a try in the next days.

Mit freundlichen Grüßen
Best regards

Norman Leutner

____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh