4 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
30 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
43 include_once
'Modules/Chatroom/classes/class.ilChatroom.php';
47 $this->gui->switchToVisibleMode();
49 require_once
'Modules/Chatroom/classes/class.ilBannedUsersTableGUI.php';
52 $table->setFormAction( $ilCtrl->getFormAction( $this->gui,
'ban-show' ) );
58 $table->setData( $room->getBannedUsers() );
61 $this->gui->tpl->setVariable(
'ADM_CONTENT', $table->getHTML() );
69 public function delete()
79 if( !is_array( $users ) )
82 $ilCtrl->redirect( $this->gui,
'ban-show' );
86 $room->unbanUser( $users );
88 $ilCtrl->redirect( $this->gui,
'ban-show' );
112 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", ROOT_FOLDER_ID);
113 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
121 $scope = $room->getRoomId();
130 $message = json_encode($messageObject);
134 'message' => $message,
138 $query = http_build_query($params);
139 $connector = $this->gui->getConnector();
140 $response = $connector->kick($scope,
$query);
141 $responseObject = json_decode($response);
145 if($responseObject->success ==
true)
147 $room->addHistoryEntry($messageObject,
'', 1);
149 $message = json_encode(array(
150 'type' =>
'userjustkicked',
151 'user' => $params[
'userToKick'],
155 $connector->sendMessage($room->getRoomId(), $message, array(
161 $room->disconnectUser($params[
'userToKick']);
166 $response = json_encode(array(
168 'reason' =>
'unkown room' 186 $data =
new stdClass();
188 $data->user = $this->gui->object->getPersonalInformation( $user );
189 $data->userToKick = $messageString;
190 $data->timestamp = date(
'c' );
191 $data->type =
'kick';
active()
Kicks and bans user, fetched from $_REQUEST['user'] and adds history entry.
executeDefault($method)
Calls $this->show method.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
show()
Displays banned users task.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
Class ilBannedUsersTableGUI.
buildMessage($messageString, ilChatroomUser $user)
Instantiates stdClass, sets $data->user and $data->userToKick using given $messageString and $chat_us...
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
__construct(ilChatroomObjectGUI $gui)
Constructor.
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']