Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Hide User Groups Membership Information?
Avatar
Michael Walden
Member
Free Members
sp_UserOfflineSmall Offline
Oct 17, 2017 - 7:34 pm

Is it possible turn off or remove the ability for users to see what user groups other members belong to? For example on a post in the author box it lists the user name, rank and then groups the author is a member of.

For privacy reasons I would like to disable the display of user group membership in the author box and in member lists as well. I do not want to hide the user, just their user group membership information.

I would also prefer that this information NOT be hidden from admins and moderators. Of curse I just have to be difficult...  🙂

This would be a very nice admin option and perhaps as a preference setting in the user profile options so that a user can decide whether or not his or her user group affiliation is displayed.

“I must stop him from being one of those who call themselves good because they have no claws.” ― Irvin D. Yalom, When Nietzsche Wept

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2017 - 3:13 am

not sure I really understand the use case for hiding the usergroup memberships, but doesnt really matter...  our themes are very much like WP themes... everything displayed is controlled by template functions... you have complete control over what is display or not displayed...

so you just need to qualify the display of usergroup info int he topic view template file...

but first, I really need to ask for clarification...  when you say author box, are you referring to the author info section to the right (in most themes) of topic posts???  or other?  do you mean the profile?

as with WP themes, in SP themes you have complete control over what is displayed or not via the template files and the functions within...

of course, before making any sp theme mods, you really should make a child theme or a custom theme...

for example in your sp theme, look for this (assuming you meant profile):

                                        sp_UserMembership('', $spProfileUser->memberships);

to only display for admins and mods, change to

                                        if ($spThisUser->admin || $spThisUser->moderator) sp_UserMembership('', $spProfileUser->memberships);

and it will only be displayed to admins and mods...  this example is from reboot, but applies to other themes that display it...  worth noting, its also for the profile popup template file... you may want the same change for the profile display template file...

The members list you mention is a bit more problematic.. and needs more questions and understanding... 

do you even want to show a members list??  normally, its organized by usergroup... if you dont want folks to know memberships, may make more sense to just remove the members list...  we can help if that is what you really want to do...

if you just want a singular list of members, you might look in your members view template for this line

                        if (sp_has_member_groups('usergroup', 'id', 'asc', 15, true)) {

and change it to

                        if (sp_has_member_groups('user', 'id', 'asc', 15, true)) {

and see if that gives you what you want...

Avatar
Michael Walden
Member
Free Members
sp_UserOfflineSmall Offline
Oct 18, 2017 - 3:34 am

I'll explain briefly. The site is for an organization that has various levels. I have created a user group and forum for the general membership of this organization as well as a user group and forum for each level of this organization. We would prefer that the users level within the organization not be common knowledge. Does that make any sense?

I guess my questions was much more loaded than I assumed haha! That's me all over!

Using this forum as a reference by authorbox I mean the information that is displayed 

<--- Here My name, avatar etc... I would like to remove the User Group titles from there. 

To solve the member list issue, I just restricted it to admins and mods. Easy enough fix once I had some sleep  haha!

While I am at it, is the login on the sidebar a widget that is available for the current release or is that coming up in the future release? I could sure use it 🙂

“I must stop him from being one of those who call themselves good because they have no claws.” ― Irvin D. Yalom, When Nietzsche Wept

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 18, 2017 - 5:41 am

It's a home-grown custom widget. Too entwined in our membership plugin etc., to be if use to anyone else. But you should find similar widgets in the WP plugin repository.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Michael Walden
Member
Free Members
sp_UserOfflineSmall Offline
Oct 20, 2017 - 12:08 pm

I resolved this by commenting out the line that displays the group membership in topic displays (it was already done in the mobile topic display template).

In our case the displaying usergroup membership is important only to admins and mods who can see it in the membership list. 

Thank you! exclaim

“I must stop him from being one of those who call themselves good because they have no claws.” ― Irvin D. Yalom, When Nietzsche Wept

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625