Show the usergroup in profile

3 months 3 weeks ago #1 by Estaid
Hello!

How can I show a usergroup of the user in his profile at frontend?

Thanks

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

3 months 2 weeks ago #2 by Function90
Helo Estaid,

Sorry for delay. We will display user's usergroup in our next release. Please wait for couple of days.

Thank you
Team Function90
You can share your views regarding our extension at JED ( extensions.joomla.org/profile/profile/details/225115#extensions )

Hire Professional Joomla Developers. ( www.function90.com/contact-us.html )

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

3 months 2 weeks ago #3 by Function90
Hello Estaid,

Sorry for delay, but we decided not to give this feature in JoomProfile. This is very specialised feature. But we will tell you how you can achieve this.

You need to override the template file from components/com_joomprofile/extensions/profile/templates/site.profile.user.profile.viewfieldgroup.php to templates/yourTemplate/html/com_joomprofile/site.profile.user.profile.viewfieldgroup.php

and add the below code wherever you want
<?php
                    $userModel = new JoomprofileProfileModelUser();
                    $juserGroups    = $userModel->getUsergroups(array($data->user->id));
      				       
                    if(isset($juserGroups[$data->user->id])){
                       foreach ($juserGroups[$data->user->id] as $juserGroup){
                           $title[]   = $juserGroup->title;
                       }?>
                       <?php echo JText::_('COM_JOOMPROFILE_USERGROUPS');?> : <?php echo implode(",", $title);;?>
                    <?php }?>

Thank you
Team Function90
You can share your views regarding our extension at JED ( extensions.joomla.org/profile/profile/details/225115#extensions )

Hire Professional Joomla Developers. ( www.function90.com/contact-us.html )
The following user(s) said Thank You: Estaid

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

3 months 1 week ago #4 by Estaid
Working fine! Thanks a lot!!

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

Powered by Kunena Forum