0

I am on Joomla 1.5 and I am trying to pass the username value of my login module, that shows as a greeting anytime a user is logged in, to a article so i'll be able to customize the article to the user's profile. What would be the best way to do this? thanks

user1664433
  • 63
  • 3
  • 9

1 Answers1

1

The simplest method is to use Joomla's User Object.

Like :

$user = &JFactory::getUser();

echo $user->name;//You will get name,username,email etc .using same object

In the article section just use above line. in components/com_content/view/article/default.php or any other view you want.

The user object will return the current logged user info.

hope this will help you..

Jobin
  • 8,238
  • 1
  • 33
  • 52