Welcome, Guest
Username Password: Remember me

Customize template for registered users
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Customize template for registered users

Customize template for registered users 12 years, 8 months ago #5308

  • bmurphy
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
Hi-

In the last version of mobile joomla, I was able to show a position to guests and hide it from registered users through the following code.
$user = &JFactory::getUser();
if($user->guest){
if($modulepos && $this->countModules($modulepos) > 0)
{
$MobileJoomla->loadModules($modulepos);
}}

now, I can't echo the $user. Appreciate some help.

Re: Customize template for registered users 12 years, 8 months ago #5311

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
Should work. Check that $modulepos is assigned above this code.

Re: Customize template for registered users 12 years, 8 months ago #5312

  • bmurphy
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
worked fine before the last upgrade. now if you echo $user nothing happens. You can check it out at vidons.com on iphone.

Re: Customize template for registered users 12 years, 8 months ago #5314

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
$user is an object, so to print it out you should use print_r($user); or var_dump($user);
  • Page:
  • 1
Time to create page: 0.06 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.