HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Forcing a User's Usergroup During the Registration Process

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#65857 (In Topic #14091)
box
Avatar

Fan in action

Different registration links--> Different Usergroups... How do I do this?

Hi,

Let's say I have two distinct, customer-only usergroups, A and B.

I want some people to register for Group A, and others to register for Group B.

Intuitively, I suspect the best way to do this would be to set up different registration pages, e.g.,

HiddenRegPage_A.php and HiddenRegPage_B.php

(I prefer completely different pages because I want A and B groups to see different things on registration.)

QUESTION:

What value do I give to what parameter in order to set the usergroup?

And do I just do this with a hidden field in the login form?

Thanks! :)
Back to the top
 
Posted
Rating:
#65862
Avatar

Community saint

You can probably achieve your objective by using the if_in_group call on your front page. But first you'd need to set up your particular groups.

I do something similar, but superficial, without drilling down to special blocks or miniblocks. I have a welcome for 'Visitors' that differs to the welcome for 'Registered Users', and achieve it like this:

Code

 [if_in_group="1"]{+START,BOX,Visitors,100%,curved}<br />
[block]main_greeting[/block]
 {+END}[/if_in_group]
 [if_in_group="2,3,4,5,6,7,8,9,10,11,12,13"]{+START,BOX,Members,100%,curved}[block]main_greeting[/block]
 {+END}[/if_in_group]

As you can see, Group 1 (Visitors) get to see one form of welcome, while all the others get to see something else.

Is that the sort of thing you were considering?

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#65867
box
Avatar

Fan in action

Thanks.

Actually, I'm thinking in terms of the initial registration- meaning, before a visitor is part of the OCP system.

Example:
Customer Jill comes from Site_1; Customer Jack comes from Site_2; OCP is installed on Site_3.

*Site_1's thank-you page leads to www.Site_3.com/groupAregistration.php… which carries an OCP registration form for Group A.
*Site_2's thank-you page leads to www.Site_3.com/groupBregistration.php… which carries an OCP registration form for Group B.

I'm trying to get a given registration form to register a user for Group A or Group B, depending on the values in the form.

Any suggestions on how to set this up?

Thanks again.
Back to the top
 
Posted
Rating:
#65875
Avatar

Community saint

I think I understand your overall concept although I am at a loss as to what to advise about the 'separation'.

I assume, using your example, that your ocP site (Site 3) has 'common' content that is visible to both members, but that they interact in different ways? If that is the case then 'page redirects' would probably need to be set up for each category of user.

At the moment I feel that this sort of programming is way above my pay grade! But I am sure there are others reading this thread who could throw some light on the matter.

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#65880
box
Avatar

Fan in action

>I assume, using your example, that your ocP site (Site 3) has 'common' content that is visible to both members, but that they interact in different ways?

Yes.

What I'm trying to figure out is how to set a user's Usergroup at the time of registration.

Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: