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:
parent
a421cc92c5
commit
26604e9ae7
@ -38,6 +38,7 @@ public function __toString() {
|
|||||||
*/
|
*/
|
||||||
public function canEnter(\wcf\data\user\User $user = null) {
|
public function canEnter(\wcf\data\user\User $user = null) {
|
||||||
if ($user === null) $user = WCF::getUser();
|
if ($user === null) $user = WCF::getUser();
|
||||||
|
if (!$user->userID) return false;
|
||||||
|
|
||||||
$ph = new \chat\system\permission\PermissionHandler($user);
|
$ph = new \chat\system\permission\PermissionHandler($user);
|
||||||
$suspensions = Suspension::getSuspensionsForUser($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) {
|
public function canWrite(\wcf\data\user\User $user = null) {
|
||||||
if ($user === null) $user = WCF::getUser();
|
if ($user === null) $user = WCF::getUser();
|
||||||
|
if (!$user->userID) return false;
|
||||||
|
|
||||||
$ph = new \chat\system\permission\PermissionHandler($user);
|
$ph = new \chat\system\permission\PermissionHandler($user);
|
||||||
$suspensions = Suspension::getSuspensionsForUser($user);
|
$suspensions = Suspension::getSuspensionsForUser($user);
|
||||||
|
Loading…
Reference in New Issue
Block a user