Fixed small issue
authorMarcel Werk <burntime@woltlab.com>
Thu, 24 Oct 2013 13:52:28 +0000 (15:52 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 24 Oct 2013 13:52:28 +0000 (15:52 +0200)
wcfsetup/install/files/lib/acp/page/UserListPage.class.php

index 23228ba66627e7e76af2e8c4c59df13bb70b7f52..a9bfc05aa85b1a9bcbb17e7da4dfa531cd878a30 100755 (executable)
@@ -243,8 +243,10 @@ class UserListPage extends SortablePage {
                        $statement = WCF::getDB()->prepareStatement($sql);
                        $statement->execute($conditions->getParameters());
                        while ($row = $statement->fetchArray()) {
-                               $row['groupIDs'] = implode(',', $userToGroups[$row['userID']]);
-                               $accessible = UserGroup::isAccessibleGroup($userToGroups[$row['userID']]);
+                               $groupIDs = (isset($userToGroups[$row['userID']]) ? $userToGroups[$row['userID']] : array());
+                               
+                               $row['groupIDs'] = implode(',', $groupIDs);
+                               $accessible = (!empty($groupIDs) ? UserGroup::isAccessibleGroup($groupIDs) : true);
                                $row['accessible'] = $accessible;
                                $row['deletable'] = ($accessible && WCF::getSession()->getPermission('admin.user.canDeleteUser') && $row['userID'] != WCF::getUser()->userID) ? 1 : 0;
                                $row['editable'] = ($accessible && WCF::getSession()->getPermission('admin.user.canEditUser')) ? 1 : 0;