4 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
5 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
54 parent::__construct($gui);
60 public function delete()
62 $users = $_REQUEST[
'banned_user_id'];
88 include_once
'Modules/Chatroom/classes/class.ilChatroom.php';
92 $this->gui->switchToVisibleMode();
94 require_once
'Modules/Chatroom/classes/class.ilBannedUsersTableGUI.php';
97 $table->setFormAction($this->controller->getFormAction($this->gui,
'ban-show'));
101 $data = $room->getBannedUsers();
103 $actorIDs = array_filter(array_map(
function (
$row) {
104 return $row[
'actor_id'];
107 require_once
'Services/User/classes/class.ilUserUtil.php';
111 array_walk(
$data,
function (&
$row) use ($names, $sortable_names) {
112 if (
$row[
'actor_id'] > 0 && isset($names[
$row[
'actor_id']])) {
113 $row[
'actor_display'] = $names[$row[
'actor_id']];
114 $row[
'actor'] = $sortable_names[$row[
'actor_id']];
116 $row[
'actor_display'] = $this->
language->txt(
'unknown');
117 $row[
'actor'] = $this->
language->txt(
'unknown');
124 $this->gui->tpl->setVariable(
'ADM_CONTENT',
$table->getHTML());
135 $subRoomId = $_REQUEST[
'sub'];
136 $userToBan = $_REQUEST[
'user'];
140 $connector = $this->gui->getConnector();
141 $response = $connector->sendBan($room->getRoomId(), $subRoomId, $userToBan);
144 $room->banUser($_REQUEST[
'user'], $this->
user->getId());
145 $room->disconnectUser($_REQUEST[
'user']);
This class provides processing control methods.
__construct(ilChatroomObjectGUI $gui, \ilCtrl $controller=null, \ilLanguage $language=null, \ilUser $user=null)
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed.
sendResponse($response)
Sends a json encoded response and exits the php process.
exitIfNoRoomExists($room)
Checks if a ilChatroom exists.
show()
Displays banned users task.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class ilChatroomGUIHandler.
Class ilBannedUsersTableGUI.
active()
Kicks and bans user, fetched from $_REQUEST['user'] and adds history entry.
isSuccessful($response)
Checks for success param in an json decoded response.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
if(empty($password)) $table
executeDefault($method)
{}
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.