eZ Community » Forums » Setup & design » Two registration forms with diferent...
expandshrink

Two registration forms with diferent user groups

Two registration forms with diferent user groups

Friday 18 July 2008 12:38:13 pm - 10 replies

Hello, it is way to creat two registration forms with diferent user groups the user register for example i need that user can register to member or member2 gruop. Then user register with diferent forms and automaticaly must be added to member or member2 group indipent witch for user use.

Friday 18 July 2008 12:45:19 pm

Hi Martynas,

This location for creating registered users is configured in site.ini:
[UserSettings]
DefaultUserPlacement=12

So you could make additional siteaccess which will have custom usergroup ID for placement

Friday 18 July 2008 2:17:07 pm

Thanks Ivo.

The DefaultUserPlacement setting is useful as i need to create users under different siteaccesses that belong to different user groups, and this should help with this.

Cheers,

Jamie

Friday 18 July 2008 2:24:55 pm

What is the id (12) you refer to:-

DefaultUserPlacement=12

I'm assuming not a node id or object id of the user group. I can't see any other identifier when i view the user group in the User account area of the admin panel.

Thanks,

Jamie

Friday 18 July 2008 2:26:10 pm

Yes, how James say DefaultUserPlacement setting is useful if i need to create users under different siteaccesses, but if i need creat two different user groups in one siteaccess for example, i have ENG siteaccess and in this siteaccess i can creat one user to one group on also can creat user for another group.

Friday 18 July 2008 2:43:03 pm

James,

12 is node_id of the user group 'guest accounts' (this is default setting)

Martynas,

siteaccess has nothing to do with the user tree, you can have register form in one siteaccess placing users in specified group and use the users in another siteaccess. What you need is to make another siteaccess which is identical to the original one, modify the setting for user placement and override the register form template if it is different.

Friday 18 July 2008 2:58:33 pm

Or how to override user/register for. If i try override template i use code for exmaple,

[billboard_banner]
Source=content/view/billboard.tpl
MatchFile=billboard/banner.tpl
Subdir=templates
Match[class_identifier]=banner

I dont find how to override user/register.

So need creat two forms with two form action user/register and user/register2, but how to override user/register2 action that use siteacces2 settings DefaultUserPlacement which set not 12 for example 14.

Maybe you can give example.

thanks

Friday 18 July 2008 3:29:55 pm

AFAIK you can't override register.tpl with override.ini, but this is not the only way happy.gif Emoticon

1. create additional design directory and place register.tpl in it: design/additional/templates/user/register.tpl

2. in site.ini of the additional siteaccess configure additional design
[DesignSettings]
SiteDesign=additional
AdditionalSiteDesignList[]=your_main_design

3. clear the cache

Friday 18 July 2008 10:37:59 pm

Thanks Ivo for quick ansver. So i creat how you say additional design directory ezwebin_site2 and put register.tpl in design/ezwebin_site2/templates/user/register.tpl. Next creat copy additional siteaccess 'eng2' and in site.ini file put
[DesignSettings]
SiteDesign=ezwebin_site2
AdditionalSiteDesignList[]=ezwebin_site

So user want register and prees link user/register in site and i see register form so what do i add more to register form ? That ez understand which site.ini file use.

Another way is if i try use somfing like user/register?type=member_group and get parameter 'member_group' in register.php set diferent DefaultUserPlacement. It is good way try to do like this ?

Also can i creat two diferent register forms for users ?

Thanks

Modified on Friday 18 July 2008 10:38:37 pm by Martynas Bilevičius

Saturday 19 July 2008 10:40:06 am

Sorry for not being more precise.

With http://your.site.com/user/register url you are accessing your default siteaccess and the original register.tpl
With http://your.site.com/eng2/user/register you are accessing you additional siteaccess which is using different register.tpl (and different DefaultUserPlacement setting)

All of this is a bit complicated but this is the only way how to do this that I know of. Setting the DefaultUserPlacement with GET parameter is not possible.

Cheers

Sunday 20 July 2008 11:21:04 am

Hello, Ivo Lukac now understand how to do.

Very fanks.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from