Hi!
here is the work. I know this is hack but it worked for me for the
time being. I am also new to joomla development. I am working to use
over ride method so that we donot need to hack joomla core. Here is
the code which I used to fix this problem in joomla 1.6
Hi!
You go like that.
1. edit /components/com_user/models/forms/registration.xml
I added sql field like
<field name="group" type="sql"
description="Select your group"
filter="string"
label="Select your group"
query="select id as id, title as til from jos_usergroups where id =
10 or id = 9 or id = 12 or id = 13 order by title asc"
key_field="id" value_field="til"
message="COM_USERS_REGISTER_NAME_MESSAGE"
multiple="no"
required="true">
<option value="">Select group</option>
</field>
the important that is that field name is the same corresponding field
in the database. I have not tested but you can checked it and I
followed the same way. There is field 'group' available in jos_user
table. you can select what ever groups you want to bring to front end
through query.
2. then edit components/com_user/models/registeration.php in register
function at line 306 add
$data['groups'][0]=$data['group'];
That's it.
3. Donot forget to give permissions to user groups to login through
front end.
Go to back end site administration and go to users page there you will
find options button on top right corner. You will be able to see your
news user groups there and give permission to your usergroups for site
login.
this code bypasses the default group Id which is registered group. and
save new group id in jos_user_usergroup_map table against user id.
Hopefully, It will help you.
Best regards,
/Hasan
On Sep 8, 2:19 pm, "Nicholas K. Dionysopoulos" <
nikosd...@gmail.com>
wrote:
> Hi Steve,>
> This is not possible using just the core functionality of Joomla!. Joomla! will only allow you to select one group to automatically put all users in. You can either use an extension which adds additional profile fields to the user registration (if you don't really need the Joomla! user groups' functionality) or use a subscriptions extension which is capable of placing users to different user groups, depending on their subscription status.
>
> In the latter case, I can only tell you about the subscription component I have build, Akeeba Subscriptions, which does have this feature (and it's free of charge). If you assign a price of 0 to a subscription, you can use it for the exact purpose you seem to have in mind. If it's something that interests you, please contact me off list so that we don't get to spam the other participants with our chit-chat :)
>
> Cheers,
>
> --
> Nicholas K. Dionysopoulos
> Lead Developer, AkeebaBackup.com
> Web:
http://www.AkeebaBackup.com
> Blog:
http://www.dionysopoulos.me/blog
>
>
>
>
>
>
>
> On Thursday, 8 September 2011 at 13:44, steve carter wrote:
> > Hi i am trying to do the same thing so a user can choose from a predifined groupe eg seeking services and service provider but not having any luck would anyone be able to explain how to do this please joomla 1.7
>
> > many thanks steve
> > --
> > You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
> > To view this discussion on the web, visithttps://
groups.google.com/d/msg/joomla-dev-general/-/w-FzQuURhVEJ.
> > To post to this group, send an email to
joomla-de...@googlegroups.com (mailto:
joomla-de...@googlegroups.com).
> > To unsubscribe from this group, send email to
joomla-dev-gene...@googlegroups.com (mailto:
joomla-dev-gene...@googlegroups.com).