aboutsummaryrefslogtreecommitdiffstats
path: root/core/include/user/list.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/include/user/list.php')
-rw-r--r--core/include/user/list.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/include/user/list.php b/core/include/user/list.php
index 4ce9fc8..adc28ec 100644
--- a/core/include/user/list.php
+++ b/core/include/user/list.php
@@ -34,12 +34,12 @@ if(Application::get('USER.SINGLE_REDIRECT') === TRUE AND $count === '1') {
# TRY: Template\Exception
#===============================================================================
try {
- $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;