mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Fix WhisperCommand when user does not exist
This commit is contained in:
parent
1c1f695ecd
commit
ad30fe8695
@ -30,7 +30,7 @@ public function __construct(\chat\system\command\CommandHandler $commandHandler)
|
||||
}
|
||||
|
||||
$this->user = UserProfile::getUserProfileByUsername($username);
|
||||
if (!$this->user->userID) throw new \chat\system\command\UserNotFoundException($username);
|
||||
if (!$this->user) 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)));
|
||||
|
Loading…
Reference in New Issue
Block a user