private function unbanResponse(User $user, UserDAO $unBanUserDAO) { $response = (new MessageResponse())->setMsg(MsgToken::create('UserIsUnbanned', $unBanUserDAO->getPropeties()->getName()))->setTime(null)->setChannelId($user->getChannelId())->setGuests(DI::get()->getUsers()->getUsersByChatId($user->getChannelId())); (new UserCollection())->attach($user)->setResponse($response)->notify(false); if ($unBanUser = DI::get()->getUsers()->getClientById($unBanUserDAO->getId())) { $response = (new MessageResponse())->setMsg(MsgToken::create('UserUnbannedYou', $user->getProperties()->getName()))->setChannelId($unBanUser->getChannelId())->setTime(null); (new UserCollection())->attach($unBanUser)->setResponse($response)->notify(false); } }
/** * @return PropertiesDAO */ public function getProperties() { return $this->userDAO->getPropeties(); }