Everything is for free!
Shop is closed.
Due to health issues support is very limited

file Problem with FUA and jomsocial: automatically assign to user group

More
10 years 8 months ago #6250 by lucaam86
Hi,
I bought Front End User Access, but I have a problem with its use.
I'm using it with Jomsocial.
I want to make sure that when a user registers Jomsocial by selecting a drop down menu option (selectbox) that is automatically assigned to a group of users that I created FUA.

This I can with Community Builder but I can not with Jomsocial.
Someone can explain to me STEP BY STEP how to configure with Jomsocial FUA to put users into different groups depending on the choices made ​​in the registration?
I create a new field in Jomsocial, name of field is: field_seiun
This field have 4 option, names of options are:
Parrucchiere
Estetista
Centro-Estetico

Now in FUA I setting this:

<select name="field_seiun">
<option value="1">Parrucchiere</option>
<option value="2">Estetista</option>
<option value="3">Centro-Estetico</option>
</select>

and This:

$value = JRequest::getVar('field_seiun', '');
if($value=='1'){
$groups = '16';
}elseif($value=='2'){
$groups = '16';
}elseif($value=='3'){
$groups = '16';
}

But not working. WHy?
Can you help me please?
thank you

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago - 10 years 8 months ago #6253 by carsten888
Now in FUA I setting this:

<select name="field_seiun">
<option value="1">Parrucchiere</option>
<option value="2">Estetista</option>
<option value="3">Centro-Estetico</option>
</select>
That code should not be in the FUA config. The example code on the FUA config > 'users' page is an example of the HTML output at the frontend of the website. Assuming you correctly created the field in Jomsocial, open the registration page and look in the source code. search for 'field_seiun'. Check if the values are really 1,2,3.

If the above html is correct then each of the selected choice would assign the user to the group with id 16. I assume this is not how you want it, so you might want to change the id's to match the selection ;)
$value = JRequest::getVar('field_seiun', '');
if($value=='1'){
$groups = '16';
}elseif($value=='2'){
$groups = '16';
}elseif($value=='3'){
$groups = '16';
}

In FUA config > 'users' at 'assign to group from select on registration form ', the checkbox 'enabled' should be checked AND the above code should be the only code in 'code to be used when processing registration form: '.

Did you have a look here:
$value = JRequest::getVar('field_seiun', '');
if($value=='1'){
$groups = '16';
}elseif($value=='2'){
$groups = '16';
}elseif($value=='3'){
$groups = '16';
}

No worries, I will help you set this up. I understand this can be really tricky. But there are just too many options to give a step by step tutorial for each way this can be configured. I can't make this any easyer, sorry.
Last edit: 10 years 8 months ago by carsten888.

Please Log in or Create an account to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum
 
spicy-sacerdotal