4 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
5 require_once
'Modules/Chatroom/classes/class.ilChatroomUser.php';
58 private function inviteById($invited_id)
68 $ilCtrl->setParameterByClass(
'ilrepositorygui',
'ref_id', ROOT_FOLDER_ID);
69 $ilCtrl->redirectByClass(
'ilrepositorygui',
'');
75 $user_id = $chat_user->getUserId();
79 $response = json_encode(array(
81 'reason' =>
'unkown room'
83 echo json_encode($response);
88 $response = json_encode(array(
90 'reason' =>
'not owner of private room'
92 echo json_encode($response);
96 $connector = $this->gui->getConnector();
98 $result = $connector->inviteToPrivateRoom($room,
$_REQUEST[
'sub'], $ilUser, $invited_id);
100 $room->sendInvitationNotification($this->gui, $chat_user, $invited_id, (
int)
$_REQUEST[
'sub']);
106 public function getUserList()
113 require_once
'Services/User/classes/class.ilUserAutoComplete.php';
115 if($ilUser->isAnonymous())
119 $auto->setUser($ilUser);
121 $auto->setSearchFields(array(
'firstname',
'lastname'));
122 $auto->setResultField(
'login');
123 $auto->enableFieldSearchableCheck(
true);