mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
parent
7acf736510
commit
d0d091547c
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace chat\system\command\commands;
|
namespace chat\system\command\commands;
|
||||||
use \wcf\data\user\User;
|
use \wcf\data\user\UserProfile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whispers a message.
|
* Whispers a message.
|
||||||
@ -29,8 +29,13 @@ public function __construct(\chat\system\command\CommandHandler $commandHandler)
|
|||||||
throw new \InvalidArgumentException();
|
throw new \InvalidArgumentException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->user = User::getUserByUsername($username);
|
$this->user = UserProfile::getUserProfileByUsername($username);
|
||||||
if (!$this->user->userID) throw new \chat\system\command\UserNotFoundException($username);
|
if (!$this->user->userID) throw new \chat\system\command\UserNotFoundException($username);
|
||||||
|
if (!\wcf\system\WCF::getSession()->getPermission('user.profile.cannotBeIgnored')) {
|
||||||
|
if ($this->user->isIgnoredUser(\wcf\system\WCF::getUser()->userID)) {
|
||||||
|
throw new \wcf\system\exception\UserInputException('text', \wcf\system\WCF::getLanguage()->getDynamicVariable('chat.error.whisper.ignoresYou', array('user' => $this->user)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->didInit();
|
$this->didInit();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user