MyBB Community Forums

Full Version: Display additional groups name in memberlist.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'd like to add a column in memberlist table containing the additional groups of each user.
I've used the $mybb->user['additionalgroups'] variable but I realized it prints out gids, while I'd want to get group name Sad
Unfortunately you'll need a plugin for that. If you are familiar with PHP, you'll use the $cache->read("usergroups"). This returns [gid][title]. You just loop through the field after first checking if they have additional usergroups. If you are not too familiar with PHP, you can try posting in Plugin Requests.
(2018-09-21, 04:02 PM)dragonexpert Wrote: [ -> ]Unfortunately you'll need a plugin for that.  If you are familiar with PHP, you'll use the $cache->read("usergroups").  This returns [gid][title].  You just loop through the field after first checking if they have additional usergroups.  If you are not too familiar with PHP, you can try posting in Plugin Requests.

Understood, instead what if I wanted to add a column for user biography? May it be done using MyBB variables?
It isn't going to be parsed through the parser so there won't be new lines and it potentially may contain words in your word filter list. I'm also not making any guarantees on whether an XSS attack is possible since that field is not used on that page in the core.