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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 10:20:49
Script start
Timing: Jan 18 2025 10:20:49
Module start 'layout'
Timing: Jan 18 2025 10:20:49
Module start 'content'
Timing: Jan 18 2025 10:20:50
Module end 'content'
Timing: Jan 18 2025 10:20:50
Script end

Main resources:

Total runtime0.6509 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 591.3438152.6563
Module start 'layout' 0.00660.0040 744.000039.5078
Module start 'content' 0.01060.6387 783.5078586.0781
Module end 'content' 0.64930.0015 1,369.585912.1094
Script end 0.6508  1,381.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00991.5154160.0006
Check MTime0.00130.1967160.0001
Mysql Total
Database connection0.00080.121510.0008
Mysqli_queries0.571187.7367600.0095
Looping result0.00070.1038580.0000
Template Total0.607093.320.3035
Template load0.00230.350020.0011
Template processing0.604792.911720.3024
Template load and register function0.00020.034410.0002
states
state_id_array0.00180.283010.0018
state_identifier_array0.00110.163920.0005
Override
Cache load0.00190.2974460.0000
Sytem overhead
Fetch class attribute can translate value0.00070.102130.0002
Fetch class attribute name0.00150.224950.0003
XML
Image XML parsing0.00400.618130.0013
class_abstraction
Instantiating content class attribute0.00000.001350.0000
General
dbfile0.00500.7608220.0002
String conversion0.00000.001740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs