1
balsimar
Get users groups?
  • 2006/6/21 18:26

  • balsimar

  • Just popping in

  • Posts: 13

  • Since: 2005/11/30


Hi,

I'm trying to determine a users groups in my theme so that specific elements can be visible or not based on group permission.

The problem I have, is whenever I try and access $xoopsUser the result is a blank page.

Here is what I'm attempting:

<{if $xoops_isuser}>
        <{
php}>
             
$Groups $xoopsUser->getGroups();
        <{/
php}>
<{/if}>


Theoreticly, this should produce an array ($Groups) as long as the user is logged in, but in reality it's breaking my theme. (white page) If I remove $Groups = $xoopsUser->getGroups(); and put anything else in there, such as static text, it works exactly as I expect... the text is display as long as I'm logged in.

Is there a trick I need to use to have access to $xoopsUser, or an alternative 'theme approved' method of determining specific group access?

2
Bender
Re: Get users groups?
  • 2006/6/21 19:10

  • Bender

  • Home away from home

  • Posts: 1899

  • Since: 2003/3/10


Does this thread maybe help?

$xoops_isadmin, $xoops_isuser, but $xoops_?
Sorry, this signature is experiencing technical difficulties. We will return you to the sheduled signature as soon as possible ...

3
balsimar
Re: Get users groups?
  • 2006/6/21 20:23

  • balsimar

  • Just popping in

  • Posts: 13

  • Since: 2005/11/30


Quote:

Bender wrote:
Does this thread maybe help?

$xoops_isadmin, $xoops_isuser, but $xoops_?


wow that looks like it will work perfect!

Thanks much.

Login

Who's Online

325 user(s) are online (192 user(s) are browsing Support Forums)


Members: 0


Guests: 325


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