Search code examples
joomlajoomla2.5user-profileuser-management

Print All Users - Joomla 2.5


I am new to Joomla. I have created website using Joomla 2.5. I have login page which is default Joomla user management system.

What I want is display all user data in a tabular format. How could I do the same?

Edit 1

I can see the users with below steps.

  1. Go to administrator page as www.site.com/administrator.
  2. Login as admin
  3. Click Users >> User Manager menu and then I can see the list of users.

I want to print same list, however on the website and not on administrator site at backend.


Solution

  • you can do this run the query on your page where you want to show user list. you can fetch all users table field with $row object.

    $db =& JFactory::getDBO();
    $query = "SELECT * FROM #__users" ;
    $db->setQuery($query);
    $rows = $db->loadObjectList();
    foreach ($rows as $row) {
      echo $row->id.'|'.$row->username.'|'.$row->email;
    }
    

    Edit 1

    Below is what I used.

    Installed extension Flexi Custom Code.

    Create module using this, add above code in it and appear that menu on the menu where you want to display.