0

I have this

$user =& JFactory::getUser();
$pageclass ="";
if(array_key_exists('Basic Spinervals Cycling Membership',$user->groups)) {
  $pageclass .="basicMemberUsers";
}
if(array_key_exists('Download Club',$user->groups)) {
  $pageclass .=" downloadClubUsers";
}
if(array_key_exists('   DVD of the Month Club',$user->groups)) {
  $pageclass .=" MonthClubUsers";
}
if(array_key_exists('Registered',$user->groups)) {
  $pageclass .=" RegisteredUsers";
}

In my head tag in my index.php

then I replaced body tag with this

<body class="<?php echo $this['config']->get('body_classes'); ?>">

but not working.

ekad
  • 14,436
  • 26
  • 44
  • 46
  • How is it not working? Are you getting a blank page? The wrong class? which wrong class? You need to give enough information to get help. "It's not working" is not enough information. – Elin Sep 17 '15 at 23:55

1 Answers1

0

$user->groups variable returns the ID of the usergroup, not the usergroup name. you could take a look at this answer: https://stackoverflow.com/a/13325261/4086739

Community
  • 1
  • 1
Cosmin
  • 49
  • 1
  • 3