1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Fix Room::canEnter() and Room::canWrite() for guests

This commit is contained in:
Tim Düsterhus 2013-05-23 22:43:37 +02:00
parent a421cc92c5
commit 26604e9ae7

View File

@ -38,6 +38,7 @@ public function __toString() {
*/
public function canEnter(\wcf\data\user\User $user = null) {
if ($user === null) $user = WCF::getUser();
if (!$user->userID) return false;
$ph = new \chat\system\permission\PermissionHandler($user);
$suspensions = Suspension::getSuspensionsForUser($user);
@ -68,6 +69,7 @@ public function canEnter(\wcf\data\user\User $user = null) {
*/
public function canWrite(\wcf\data\user\User $user = null) {
if ($user === null) $user = WCF::getUser();
if (!$user->userID) return false;
$ph = new \chat\system\permission\PermissionHandler($user);
$suspensions = Suspension::getSuspensionsForUser($user);