Forums / Install & configuration / Two different users that should register in the site

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Two different users that should register in the site

Author Message

Jorge estévez

Wednesday 28 April 2010 7:49:01 pm

Hello

 

I have two different users that should register in the site (with two usergroups: productmember, and needmember)

 

How can I achieve that to links go to separate register forms, and once registered then each one of the will be part of its corresponding usergroup

 

The url for registering a new user is

 

www.mysite.com/index.php/esl/user/register

 

So, is there some way I could do something like

 

www.mysite.com/index.php/esl/user/register/productmember

 

and

 

www.mysite.com/index.php/esl/user/register/needmember

 

and of course making two user classes for each usergroups, each one of the with its corresponding attributes

 

I am lost here…

 

Any Ideas,

thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Andreas Adelsberger

Wednesday 28 April 2010 11:15:51 pm

You can use a this extension:

http://ez.no/developer/contribs/workflow/automated_user_placment

Create your own registration form and hide the selection. To select the right usergroup you can pass a view parameter to your form like user/register/(type)/needmember

---------------------------------------
Styleflasher New Media OG
Websites. Games/Multimedia.

Abdelkader RHOUATI

Thursday 29 April 2010 2:04:50 am

HI,

This feature does not exist by default on ez, so I think the most simple and clean, will:

1 - Override the user module (override only the register view, with create a module and a view with the same name, ie user and register, in an extension). also adjusts the view definition so that it takes as a parameter the desired location.

2 - Override the template user/register.tpl, to be able to sent in hidden input the location of new user.

3 - On line 118, of the file view register (register.php); you replace:

$DefaultUserPlacement = (int) $ ini-> variable ("UserSettings", "DefaultUserPlacement");

by

// assume that the location is sent by  post from the registration form

$DefaultUserPlacement = (int) $ http->getVariable('location');

Regrads.

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery