1
Koeneke
how to get the name of a group?
  • 2009/1/7 20:42

  • Koeneke

  • Just popping in

  • Posts: 19

  • Since: 2008/1/30


Hello,

how do I get the name of a group if I have the ID?
let's say I have $groupid = 1... then I would like to have in $groupname = "webmasters"

I think it has to be something like:
$groupname groups($groupid)->getvar(groupname)

but I now this is not correct...

anyone can direct me in the right direction?

Can anyone also tell me where I can find a list with samples and explanation of XOOPS classes?

Thanks,
Koeneke

2
Koeneke
Re: how to get the name of a group?
  • 2009/1/7 21:13

  • Koeneke

  • Just popping in

  • Posts: 19

  • Since: 2008/1/30


ok,

I took some time to investigate some classes and found a sollution:

$groupid 1;
$member_handler =& xoops_gethandler('member');
$grouplist $member_handler->getGroupList();
$groupname $grouplist[$groupid]; // groupname will be "webmasters"


Is this the best and fastest way to get a groupname?

Thanks

3
sarahmx
Re: how to get the name of a group?
  • 2009/1/7 22:26

  • sarahmx

  • Quite a regular

  • Posts: 381

  • Since: 2007/10/28


i don't know if this is related..but i used to use this hack last time


https://xoops.org/modules/smartfaq/faq.php?faqid=642

4
trabis
Re: how to get the name of a group?
  • 2009/1/8 0:35

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


$groupid 1;
$group_handler =& xoops_gethandler('group');
$group $group_handler->get($groupid);
$groupname is_object($group) ? $group->getVar('name') : 'Group not found';


This is more correct ;)

5
trabis
Re: how to get the name of a group?
  • 2009/1/8 0:41

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

Koeneke wrote:
Can anyone also tell me where I can find a list with samples and explanation of XOOPS classes?


Good!
https://xoops.org/modules/mediawiki/index.php/?title=CategoryevWiki

Excellent!!!
https://xoops.org/modules/mediawiki/index.php?title=Categoryevelopment

Login

Who's Online

431 user(s) are online (297 user(s) are browsing Support Forums)


Members: 0


Guests: 431


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits