Topic-icon Assign users to fixed user group

Active Subscriptions:

None
11 years 3 months ago #51727 by consultnet
Hi Alex,
per default all users of our website are assigned to the user group "Registered". I need to keep this setting as it is for different reasons.
Nevertheless I need all users that register via LinkedIn, Google+, facebbook and Windows Live to be assigned to a different user group (NOT Registered). I assume that there is a piece of code that can easily be changed to achieve this. Could you please navigate me to the right spot? And how can I edit it so that it is not overwritten when I do the next update?
Thanks,
Uwe
The topic has been locked.
Support Specialist
11 years 3 months ago #51732 by alzander
We can navigate you to the right spot, but there's not a way to edit it in such a way that it won't be overwritten on the next release. However, we are planning to make the default user group for social network registrations to be an option in a future release later this year, so you shouldn't have to make the edit often.

The file to edit is the /components/com_jfbconnect/models/loginregister.php file. Around line 294, you'll see:
$defaultUserGroup = $config->get('new_usertype', 2);
Simply update that 2 to whatever group ID you want users to be registered into instead.

I hope that helps, but if you need anything else, just let us know.

Thanks,
Alex
The topic has been locked.