Support

  1. QuickScriptz
  2. General
  3. Thursday, October 19 2017, 02:56 AM
Hi there,

We're trying to show the usergroup of a particular user below their name in the User Map and User List. Is there any way to do what you described here: https://www.easy-profile.com/support/how-to-show-user-groups-in-report.html

I tried creating an HTML Delimiter field and specified the Availability using Access Levels, but on the User Map & User List all of the HTML Delimiter fields always show up. I also tried using the Content plugin but that similarly did not work.

Any suggestions? If I have to edit the default_user.php template file, what would I use to access the user group? $this->user->usergroup?
admin Accepted Answer
Admin
Hi,
sorry for late reply.

This way is not applicable for all uses case. for example:

- Public
- - Registered
- - UserGroup 1
- - UserGroup 2
With this structure this method will works


- Public
- - - Registered
- - - - UserGroup 1
- - - - - UserGroup 2
With this structure this method will not works because ACL associated to UserGroup1 will be inherit also from Usergroup2

-----------------

Anyway there is another way to make this but this require some PHP and Joomla Devs knowledges.
Our delimiter field type allow you to use Joomla content plugins (docs about this field type at http://docs.easy-profile.com/index.php/article/html-delimiter-field-type).

You can use some free plugin like Sourcerer (https://www.regularlabs.com/extensions/sourcerer) to get usergroups and display with some code like this:

{source}
<?php
global $JSNLIST_DISPLAYED_ID;
if($JSNLIST_DISPLAYED_ID) $owner_id=$JSNLIST_DISPLAYED_ID;
else $owner_id=JRequest::getVar( 'id' , JFactory::getUser()->id );
$usergroups_ids=JUserHelper::getUserGroups( $owner_id );
$db=JFactory::getDbo();
$query=$db->getQuery(true);
$query->select( 'title' );
$query->from( '#__usergroups' );
$query->where( 'id IN ( ' . implode( ',' , $usergroups_ids ) . ' ) ' );
$db->setQuery($query);
$usergrous=$db->loadColumn();
echo implode( ', ' , $usergrous );
?>
{/source}

Put this code in a HTML delimiter field type to show usergroups.

NOTE: this code is not tested and not supported, this is only for example purpose, you need to have PHP and Joomla devs knowledges.
  1. more than a month ago
  2. General
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.