Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Can't get content to display based on a user being in a certain group

Can't get content to display based on a user being in a certain group

I have a user group in Joomla called 'Support Team'.

I created the following:

Code:

if ($user->usertype == 'Support Team') {

echo "This is working...";
}

And it won't display this text. I have the module in the correct position as simply using:

Code:

#if ($user->usertype == 'Support Team') {

echo "This is working...";
#}

And it displays!

I also tried:

Code:

if ( MM_USER_REGISTERED ) {

$dnval = "yes!";
};
echo $dnval;

Any help would be appreciated smile

bprazner
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Can't get content to display based on a user being in a certain group

Hi,

try this way:

if ($core_genius->check("groups = Support Team")) {
echo "This is working...";
}

Please let me know if that doesn't work - it should!

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
138

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked