4 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
5 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
66 $user_id = $chat_user->getUserId();
70 $response = json_encode( array(
72 'reason' =>
'unkown room'
74 echo json_encode( $response );
77 else if(
$_REQUEST[
'sub'] && !$room->isOwnerOfPrivateRoom( $user_id,
$_REQUEST[
'sub'] ) )
79 $response = json_encode( array(
81 'reason' =>
'not owner of private room'
83 echo json_encode( $response );
87 $connector = $this->gui->getConnector();
90 $result = $connector->inviteToPrivateRoom($room,
$_REQUEST[
'sub'], $ilUser, $invited_id);
93 $room->sendInvitationNotification($this->gui, $chat_user, $invited_id, (
int)
$_REQUEST[
'sub']);
99 public function getUserList()
106 require_once
'Services/User/classes/class.ilUserAutoComplete.php';
108 if($ilUser->isAnonymous())
112 $autocomplete->setUser($ilUser);
114 echo $autocomplete->getList(
$_REQUEST[
'q']);