aboutsummaryrefslogtreecommitdiffstats
path: root/admin/user/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/user/index.php')
-rw-r--r--admin/user/index.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/admin/user/index.php b/admin/user/index.php
index 7d0cfa8..8276d91 100644
--- a/admin/user/index.php
+++ b/admin/user/index.php
@@ -26,14 +26,14 @@ if($currentSite < 1 OR ($currentSite > $lastSite AND $lastSite > 0)) {
}
#===============================================================================
-# Fetch user IDs from database
+# Fetch items from database
#===============================================================================
-$execSQL = "SELECT id FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
-$userIDs = $Database->query(sprintf($execSQL, User\Attribute::TABLE))->fetchAll($Database::FETCH_COLUMN);
+$execSQL = "SELECT * FROM %s ORDER BY {$site_sort} LIMIT ".(($currentSite-1) * $site_size).", {$site_size}";
+$Statement = $Database->query(sprintf($execSQL, User\Attribute::TABLE));
-foreach($userIDs as $userID) {
+while($Attribute = $Statement->fetchObject('User\Attribute')) {
try {
- $User = User\Factory::build($userID);
+ $User = User\Factory::buildByAttribute($Attribute);
$ItemTemplate = generateUserItemTemplate($User);
$users[] = $ItemTemplate;