1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-21 21:30:08 +00:00

Properly set $userID as key in Room::getUsers()

NewMessagesPage relies on the keys being userIDs for user storage loading.
This commit is contained in:
Tim Düsterhus 2014-03-03 03:25:37 +01:00
parent dde862d5a6
commit d1a44417e6

View File

@ -179,9 +179,9 @@ public function getUsers() {
$userList->readObjects();
$users = $userList->getObjects();
foreach ($users as $user) {
foreach ($users as $userID => $user) {
if (!isset(self::$users[$user->chatRoomID])) self::$users[$user->chatRoomID] = array();
self::$users[$user->chatRoomID][] = $user;
self::$users[$user->chatRoomID][$userID] = $user;
}
}
if (!isset(self::$users[$this->roomID])) self::$users[$this->roomID] = array();