Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 340
Fahim Parkar Avatar asked Dec 27 '22 16:12

Fahim Parkar


2 Answers

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.

like image 121
Rakesh Sharma Avatar answered Dec 29 '22 06:12

Rakesh Sharma


You'll need some sort of component for this. This user profile component for example (N.B. Using this as my example as a work colleague once used it - not as customizable as I would have liked - but probably OK for what your after. I'm sure there are more as there's an entire member list category.)

Just install one of them and choose what you want to show. Add it to a menu like any other component and off you go!

like image 33
George Wilson Avatar answered Dec 29 '22 04:12

George Wilson