Register Front End Users to specific Groups using Self-Registration
-
- New Member
- Posts: 5
- Joined: Thu Sep 18, 2008 8:39 am
Register Front End Users to specific Groups using Self-Registration
Hi,
Using CMSMS v.1.6.3, FrontEndUsers v.1.6.7, SelfRegistration v.1.2.5.
FEU and SelfRegistration are working exactly as they are meant to. However, I would like my users to be able to register for my site and select which group they join based on a dropdown.
I have created a User property called 'Type' in FEU, set as a dropdown. A user can either be a Customer or a Supplier. Currently all users automatically join a 'General' group and I manually put them in the group they have chosen from the dropdown. However, I would like to be able to skip this step and have users automatically be joined to a group based on their choice on the SelfRegistration form.
I'm wondering a) whether this would be hugely problematic to code and b) whether there's enough people who would appreciate this feature for me to spend a couple of days doing it!
I think the most appropriate way would be to have the Smarty tag as follows:
{cms_module module='SelfRegistration' group='Customer,Supplier'}
Then when module looks for the parameter 'group', if it has a comma separated value in there it will automatically add a dropdown with those options and join the user to that group.
Any ideas/problems/questions/encouragement?
Chris
Seventeen Ten Web Design
http://www.seventeenten.co.uk/
Using CMSMS v.1.6.3, FrontEndUsers v.1.6.7, SelfRegistration v.1.2.5.
FEU and SelfRegistration are working exactly as they are meant to. However, I would like my users to be able to register for my site and select which group they join based on a dropdown.
I have created a User property called 'Type' in FEU, set as a dropdown. A user can either be a Customer or a Supplier. Currently all users automatically join a 'General' group and I manually put them in the group they have chosen from the dropdown. However, I would like to be able to skip this step and have users automatically be joined to a group based on their choice on the SelfRegistration form.
I'm wondering a) whether this would be hugely problematic to code and b) whether there's enough people who would appreciate this feature for me to spend a couple of days doing it!
I think the most appropriate way would be to have the Smarty tag as follows:
{cms_module module='SelfRegistration' group='Customer,Supplier'}
Then when module looks for the parameter 'group', if it has a comma separated value in there it will automatically add a dropdown with those options and join the user to that group.
Any ideas/problems/questions/encouragement?
Chris
Seventeen Ten Web Design
http://www.seventeenten.co.uk/
Re: Register Front End Users to specific Groups using Self-Registration
So I'm only a customer, but I register and select "Supplier" (intentionally or accidentally). Now I have access to information that only a supplier should see?
Doesn't sound like a good plan to me, but maybe I'm missing something.
Doesn't sound like a good plan to me, but maybe I'm missing something.
Re: Register Front End Users to specific Groups using Self-Registration
If I would want to do this (IMHO I probably never will) I would just put several Selfregister calls behing expand/collaspe lines and just have the user expand the group they want.
This also is grouped with the fact that users can't change the groups they are members of on the change setting page.
This also is grouped with the fact that users can't change the groups they are members of on the change setting page.
-
- New Member
- Posts: 5
- Joined: Thu Sep 18, 2008 8:39 am
Re: Register Front End Users to specific Groups using Self-Registration
@jmcgin51: Customer and Supplier is just an example... There are plenty of opportunities when you want to show customised content to users based on what group they're in where the content itself isn't sensitive. I just want to make sure users have signed up before they access the content either way. I can always switch them over at a later date.
@ajprog: That's a good call - it would solve what is the biggest problem in this, which is what happens if the different groups have different user properties attached to them.
On an additional point, is it a desirable feature of FEUsers to have user choice on group selection? For instance, displaying content (or ads) on a site based on groups that the user selects?
Thanks for the quick replies guys,
Chris
Seventeen Ten
http://www.seventeenten.co.uk
@ajprog: That's a good call - it would solve what is the biggest problem in this, which is what happens if the different groups have different user properties attached to them.
On an additional point, is it a desirable feature of FEUsers to have user choice on group selection? For instance, displaying content (or ads) on a site based on groups that the user selects?
Thanks for the quick replies guys,
Chris
Seventeen Ten
http://www.seventeenten.co.uk
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Register Front End Users to specific Groups using Self-Registration
I kinda think your tackling the problem incorrectly.
Users shouldn't be able to select their groups, other than having multiple calls to the SelfRegistration module with an expand/collapse thing.
But maybe they can chose some property that adjusts their content.
i.e: What if you had a proterty called 'gender', with options 'male' and 'female'.
Then in your templates you could do something like:
Probably not the right syntax, I didn't look it up.. but you get the idea.
Users shouldn't be able to select their groups, other than having multiple calls to the SelfRegistration module with an expand/collapse thing.
But maybe they can chose some property that adjusts their content.
i.e: What if you had a proterty called 'gender', with options 'male' and 'female'.
Then in your templates you could do something like:
Code: Select all
{Banners category=$ccuser->getProperty('gender')}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Register Front End Users to specific Groups using Self-Registration
Hi, I´m from Czech, then sorry for my mistakes. But i think, that i need the same script as SeventeenTen. It will be usefull, if the frontendusers can select the group, because after that they can edit self the content of the page. For example: I select in registration form from a dropdown, that I wanna blue color styled pages and the user will be asigned to a group called Blue. And in template will be a code something simillar to this
If the user after one year will don´t like the color, he can edit it in his user details and change color to yellow, that means, he is deleted from group yellow and transfered to group called yellow...
And because a user can be assigned in more groups than one, can be there another dropdown, where he can select, what he likes and f.e. Cars, Girls, or so and on the main page can be showed only srticles about this what he likes.
If is possible to make this code for dropdown, i will welcome it, useful can be ideas or some concept too.
Thanks for response
Code: Select all
{if $ccuser->loggedin() && $ccuser->memberof('blue')}
<link rel="stylesheet" href="blue.css" type="text/css" media="all" />
{elseif $ccuser->loggedin() && $ccuser->memberof('yellow')}
<link rel="stylesheet" href="yellow.css" type="text/css" media="all" />
{else}
<link rel="stylesheet" href="default.css" type="text/css" media="all" />
{/if}
And because a user can be assigned in more groups than one, can be there another dropdown, where he can select, what he likes and f.e. Cars, Girls, or so and on the main page can be showed only srticles about this what he likes.
If is possible to make this code for dropdown, i will welcome it, useful can be ideas or some concept too.
Thanks for response
Re: Register Front End Users to specific Groups using Self-Registration
Zet,
You should be having those fields as properties not as groups the user is a member of. You are making it WAY to difficult.
You should be having those fields as properties not as groups the user is a member of. You are making it WAY to difficult.
Re: Register Front End Users to specific Groups using Self-Registration
@ajprog
Okey, Im novice, but how can be it easier?
Will be working if I make a dropdown called f.e. Style with some elements like yellow, green, blue and then use some code like this?
I have no more ideas today, help please...
Okey, Im novice, but how can be it easier?
Will be working if I make a dropdown called f.e. Style with some elements like yellow, green, blue and then use some code like this?
Code: Select all
{if $ccuser->loggedin() && $ccuser->getProperty('yellow')}
I have no more ideas today, help please...
Re: Register Front End Users to specific Groups using Self-Registration
{if $ccuser->loggedin() }
getProperty('style')}.css" type="text/css" media="all" />
{else}
{/if}
getProperty('style')}.css" type="text/css" media="all" />
{else}
{/if}
Re: Register Front End Users to specific Groups using Self-Registration
Last edited by Zet on Sat Aug 22, 2009 6:23 pm, edited 1 time in total.