• Increase font size
  • Default font size
  • Decrease font size
Home Learning About Joomla! More about Joomla! The CMS Accessing the Joomla Database

Accessing the Joomla Database

E-mail Print PDF

Some tips and tricks behind accessing information from the Joomla database:

  • Accessing the current user object - an article on how to display user information. Using the following code, you can obtain registered user information:
    $user = JFactory::getUser();
    echo "Your name is {$user->name}, your email is {$user->email}, and your username is {$user->username};
    echo "Your usertype is {$user->usertype}";

    There is also a very good plugin, Bixie Userinfo Displayer, that can be easily used in any Joomla article, such as Guest for the users full name.

  • Selecting data using JDatabase - an article on how to access information from any Joomla table, using JFactory::getDbo();
Last Updated on Wednesday, October 16 2013 18:10