Forums / Developer / Multiple registration form

Multiple registration form

Author Message

Roberto Donato

Friday 27 November 2009 6:16:36 am

Hello,
as written in the subject I need to create a registration form for multiple user groups. In other posts I read that I need to create a siteaccess for each registration form. But if I have 5-6 groups, I have to create 5-6 siteaccess? Can I create a select inside the form to the choice of the group to associate the user?

Romain Petit

Saturday 28 November 2009 4:49:20 am

Hi Roberto,

The register function does not meet your needs,

You may have to copy it into an extension, and then modify the part of register.php where it fetches the UserSettings/DefaultUserPlacement setting, and replace it with some POST variable ( with precise checks ).
And then just give access to your new module for anonymous users.

Luc Chase

Monday 30 November 2009 3:58:05 pm

Using workflow to add extra user-group locations to the new user may also help you... http://share.ez.no/forums/developer/workflow-removesubtrees-addlocation

The Web Application Service Provider

Roberto Donato

Wednesday 02 December 2009 6:13:19 am

"

Hi Roberto,

The register function does not meet your needs,

You may have to copy it into an extension, and then modify the part of register.php where it fetches theUserSettings/DefaultUserPlacement setting, and replace it with some POST variable ( with precise checks ).
And then just give access to your new module for anonymous users.

"

Hello everyone and thanks for the answers.
Romain I created an extension like you suggested, but I did not know where to edit register.php to set the value of the user group.

Roberto

Matthieu Sévère

Wednesday 02 December 2009 6:44:02 am

Hello !

I just implement a registration system with multiple location.

I created a custom workflow event that I trigger after publish. In this event I retrieve a form parameter which determine the type of user and then I move the newly created user depending on this parameter.

--
eZ certified developer: http://ez.no/certification/verify/346216

Roberto Donato

Wednesday 02 December 2009 7:35:30 am

"

Hello !

I just implement a registration system with multiple location.

I created a custom workflow event that I trigger after publish. In this event I retrieve a form parameter which determine the type of user and then I move the newly created user depending on this parameter.

"

I've never worked on the trigger in eZ publish, you could tell me how?

Matthieu Sévère

Wednesday 02 December 2009 8:09:09 am

First you have to create a custom workflow event (see some custom workflow on projects.ez.no to see how to do).

Then, you go to setup / workflow and add your workflow event for the class you want

After that you go to setup / trigger and select your workflow to trigger after/publish.

You'll have the php code of your workflow event that is executed after every publish :-)

--
eZ certified developer: http://ez.no/certification/verify/346216