ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContactGUI Class Reference
+ Collaboration diagram for ilContactGUI:

Public Member Functions

 __construct ()
 ilContactGUI constructor. More...
 
 executeCommand ()
 
 submitInvitation ()
 Last step of chat invitations check access for every selected user and send invitation. More...
 

Data Fields

const CONTACTS_VIEW_GALLERY = 1
 
const CONTACTS_VIEW_TABLE = 2
 

Protected Member Functions

 activateTab ($a_id)
 
 changeContactsView ()
 This method is used to switch the contacts view between gallery and table in the mail system. More...
 
 applyContactsTableFilter ()
 
 resetContactsTableFilter ()
 
 showContacts ()
 
 mailToUsers ()
 
 inviteToChat ()
 Send chat invitations to selected Users. More...
 

Protected Attributes

 $tpl
 
 $ctrl
 
 $lng
 
 $tabs_gui
 
 $help
 
 $toolbar
 
 $umail
 
 $user
 
 $error
 
 $rbacsystem
 
 $has_sub_tabs = false
 

Private Member Functions

 showSubTabs ()
 
 showContactRequests ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilContactGUI::__construct ( )

ilContactGUI constructor.

Definition at line 78 of file class.ilContactGUI.php.

References $DIC, help(), and user().

79  {
80  global $DIC;
81 
82  $this->tpl = $DIC['tpl'];
83  $this->ctrl = $DIC['ilCtrl'];
84  $this->lng = $DIC['lng'];
85  $this->tabs_gui = $DIC['ilTabs'];
86  $this->help = $DIC['ilHelp'];
87  $this->toolbar = $DIC['ilToolbar'];
88  $this->user = $DIC['ilUser'];
89  $this->error = $DIC['ilErr'];
90  $this->rbacsystem = $DIC['rbacsystem'];
91 
92  $this->ctrl->saveParameter($this, "mobj_id");
93 
94  $this->umail = new ilFormatMail($this->user->getId());
95  $this->lng->loadLanguageModule('buddysystem');
96  }
user()
Definition: user.php:4
help()
Definition: help.php:2
Class UserMail this class handles user mails.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ activateTab()

ilContactGUI::activateTab (   $a_id)
protected
Parameters
string$a_id

Definition at line 255 of file class.ilContactGUI.php.

Referenced by executeCommand(), inviteToChat(), and showContacts().

256  {
257  if ($this->has_sub_tabs) {
258  $this->tabs_gui->activateSubTab($a_id);
259  } else {
260  $this->tabs_gui->activateTab($a_id);
261  }
262  }
+ Here is the caller graph for this function:

◆ applyContactsTableFilter()

ilContactGUI::applyContactsTableFilter ( )
protected

Definition at line 291 of file class.ilContactGUI.php.

References ilBuddySystem\getInstance(), and showContacts().

292  {
293  if (!ilBuddySystem::getInstance()->isEnabled()) {
294  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
295  }
296 
297  require_once 'Services/Contact/BuddySystem/classes/tables/class.ilBuddySystemRelationsTableGUI.php';
298  $table = new ilBuddySystemRelationsTableGUI($this, 'showContacts');
299 
300  $table->resetOffset();
301  $table->writeFilterToSession();
302 
303  $this->showContacts();
304  }
+ Here is the call graph for this function:

◆ changeContactsView()

ilContactGUI::changeContactsView ( )
protected

This method is used to switch the contacts view between gallery and table in the mail system.

Definition at line 267 of file class.ilContactGUI.php.

References $_POST, and ilBuddySystem\getInstance().

268  {
269  if (!ilBuddySystem::getInstance()->isEnabled()) {
270  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
271  }
272 
273  if (isset($_POST['contacts_view'])) {
274  switch ($_POST['contacts_view']) {
275  case self::CONTACTS_VIEW_GALLERY:
276  $this->ctrl->redirectByClass('ilUsersGalleryGUI');
277  break;
278 
279  case self::CONTACTS_VIEW_TABLE:
280  $this->ctrl->redirect($this);
281  break;
282  }
283  }
284 
285  $this->ctrl->redirect($this);
286  }
$_POST["username"]
+ Here is the call graph for this function:

◆ executeCommand()

ilContactGUI::executeCommand ( )

Definition at line 98 of file class.ilContactGUI.php.

References $_GET, activateTab(), ilBuddySystem\getInstance(), showSubTabs(), ilUtil\stripSlashes(), and user().

99  {
100  $this->showSubTabs();
101 
102  $forward_class = $this->ctrl->getNextClass($this);
103 
104  // delete all stored maildata
105  $this->umail->savePostData($this->user->getId(), array(), '', '', '', '', '', '', '', '');
106 
107  switch ($forward_class) {
108  case 'ilmailformgui':
109  include_once 'Services/Mail/classes/class.ilMailFormGUI.php';
110  $this->ctrl->forwardCommand(new ilMailFormGUI());
111  break;
112 
113  case 'ilmailsearchcoursesgui':
114  include_once 'Services/Contact/classes/class.ilMailSearchCoursesGUI.php';
115 
116  $this->activateTab('mail_my_courses');
117 
118  $this->ctrl->setReturn($this, "showContacts");
119  $this->ctrl->forwardCommand(new ilMailSearchCoursesGUI());
120  break;
121 
122  case 'ilmailsearchgroupsgui':
123  include_once 'Services/Contact/classes/class.ilMailSearchGroupsGUI.php';
124 
125  $this->activateTab('mail_my_groups');
126 
127  $this->ctrl->setReturn($this, "showContacts");
128  $this->ctrl->forwardCommand(new ilMailSearchGroupsGUI());
129  break;
130 
131  case 'ilmailinglistsgui':
132  include_once 'Services/Contact/classes/class.ilMailingListsGUI.php';
133 
134  $this->activateTab('mail_my_mailing_lists');
135 
136  $this->ctrl->setReturn($this, "showContacts");
137  $this->ctrl->forwardCommand(new ilMailingListsGUI());
138  break;
139 
140  case 'ilusersgallerygui':
141  if (!ilBuddySystem::getInstance()->isEnabled()) {
142  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
143  }
144 
145  $this->tabs_gui->activateSubTab('buddy_view_gallery');
146  $this->activateTab('my_contacts');
147  require_once 'Services/User/Gallery/classes/class.ilUsersGalleryContacts.php';
148  require_once 'Services/User/Gallery/classes/class.ilUsersGalleryGUI.php';
149  $this->ctrl->forwardCommand(new ilUsersGalleryGUI(new ilUsersGalleryContacts()));
150  $this->tpl->printToStdout();
151  break;
152 
153  case 'ilpublicuserprofilegui':
154  require_once 'Services/User/classes/class.ilPublicUserProfileGUI.php';
155  $profile_gui = new ilPublicUserProfileGUI(ilUtil::stripSlashes($_GET['user']));
156  $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this, 'showContacts'));
157  $this->ctrl->forwardCommand($profile_gui);
158  $this->tpl->printToStdout();
159  break;
160 
161  default:
162  $this->activateTab('mail_my_entries');
163 
164  if (!($cmd = $this->ctrl->getCmd())) {
165  if (ilBuddySystem::getInstance()->isEnabled()) {
166  $cmd = 'showContacts';
167  } else {
168  $this->ctrl->redirectByClass('ilmailsearchcoursesgui');
169  }
170  }
171 
172  $this->$cmd();
173  break;
174  }
175  return true;
176  }
$_GET["client_id"]
ilUsersGalleryGUI: ilPublicUserProfileGUI ilUsersGalleryGUI: ilCourseMembershipGUI, ilGroupMembershipGUI
user()
Definition: user.php:4
GUI class for public user profile presentation.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Class ilUsersGalleryUsers.
+ Here is the call graph for this function:

◆ inviteToChat()

ilContactGUI::inviteToChat ( )
protected

Send chat invitations to selected Users.

Definition at line 537 of file class.ilContactGUI.php.

References $_POST, activateTab(), ilChatroom\lookupPrivateRoomTitle(), ilUtil\sendInfo(), ilSelectInputGUI\setOptions(), and user().

Referenced by submitInvitation().

538  {
539  $this->tabs_gui->activateSubTab('buddy_view_table');
540  $this->activateTab('my_contacts');
541 
542  $this->lng->loadLanguageModule('chatroom');
543 
544  if (!isset($_POST['usr_id']) || !is_array($_POST['usr_id']) || 0 == count($_POST['usr_id'])) {
545  ilUtil::sendInfo($this->lng->txt('select_one'), true);
546  $this->ctrl->redirect($this);
547  }
548  $usr_ids = $_POST['usr_id'];
549 
550  require_once 'Modules/Chatroom/classes/class.ilChatroom.php';
551 
552  $ilChatroom = new ilChatroom();
553  $chat_rooms = $ilChatroom->getAccessibleRoomIdByTitleMap($this->user->getId());
554  $subrooms = array();
555 
556  foreach ($chat_rooms as $room_id => $title) {
557  $subrooms[] = $ilChatroom->getPrivateSubRooms($room_id, $this->user->getId());
558  }
559 
560  include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
561 
562  $form = new ilPropertyFormGUI();
563  $form->setTitle($this->lng->txt('mail_invite_users_to_chat'));
564 
565  $psel = new ilSelectInputGUI($this->lng->txt('chat_select_room'), 'room_id');
566  $options = array();
567 
568  asort($chat_rooms);
569  foreach ($chat_rooms as $room_id => $room) {
570  $ref_id = $room_id;
571 
572  if ($ilChatroom->isUserBanned($this->user->getId())) {
573  continue;
574  }
575 
576  $options[$ref_id] = $room;
577 
578  foreach ($subrooms as $subroom) {
579  foreach ($subroom as $sub_id => $parent_id) {
580  if ($parent_id == $ref_id) {
581  $title = ilChatroom::lookupPrivateRoomTitle($sub_id);
582  $options[$ref_id . ',' . $sub_id] = '+ ' . $title;
583  }
584  }
585  }
586  }
587 
588  $psel->setOptions($options);
589  $form->addItem($psel);
590  $phidden = new ilHiddenInputGUI('usr_id');
591  $phidden->setValue(implode(',', $usr_ids));
592  $form->addItem($phidden);
593  $form->addCommandButton('submitInvitation', $this->lng->txt('submit'));
594  $form->addCommandButton('showContacts', $this->lng->txt('cancel'));
595  $form->setFormAction($this->ctrl->getFormAction($this, 'showContacts'));
596 
597  $this->tpl->setTitle($this->lng->txt('mail_invite_users_to_chat'));
598  $this->tpl->setContent($form->getHTML());
599  $this->tpl->printToStdout();
600  }
This class represents a property form user interface.
user()
Definition: user.php:4
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
This class represents a hidden form property in a property form.
static lookupPrivateRoomTitle($proom_id)
setOptions($a_options)
Set Options.
Class ilChatroom.
$_POST["username"]
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailToUsers()

ilContactGUI::mailToUsers ( )
protected

Definition at line 366 of file class.ilContactGUI.php.

References $_POST, ilObjUser\_lookupLogin(), ilMailGlobalServices\getMailObjectRefId(), ilUtil\redirect(), ilUtil\sendInfo(), showContacts(), and user().

367  {
368  if (!$this->rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId())) {
369  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
370  }
371 
372  if (!isset($_POST['usr_id']) || !is_array($_POST['usr_id']) || 0 == count($_POST['usr_id'])) {
373  ilUtil::sendInfo($this->lng->txt('mail_select_one_entry'));
374  $this->showContacts();
375  return true;
376  }
377 
378  $usr_ids = (array) $_POST['usr_id'];
379 
380  $mail_data = $this->umail->getSavedData();
381  if (!is_array($mail_data)) {
382  $this->umail->savePostData($this->user->getId(), array(), '', '', '', '', '', '', '', '');
383  }
384 
385  $logins = array();
386  foreach ($usr_ids as $usr_id) {
387  $logins[] = ilObjUser::_lookupLogin($usr_id);
388  }
389  $logins = array_filter($logins);
390 
391  if (count($logins) > 0) {
392  $mail_data = $this->umail->appendSearchResult($logins, 'to');
393  $this->umail->savePostData(
394  $mail_data['user_id'],
395  $mail_data['attachments'],
396  $mail_data['rcp_to'],
397  $mail_data['rcp_cc'],
398  $mail_data['rcp_bcc'],
399  $mail_data['m_email'],
400  $mail_data['m_subject'],
401  $mail_data['m_message'],
402  $mail_data['use_placeholders'],
403  $mail_data['tpl_ctx_id'],
404  $mail_data['tpl_ctx_params']
405  );
406  }
407 
408  ilUtil::redirect('ilias.php?baseClass=ilMailGUI&type=search_res');
409  }
static _lookupLogin($a_user_id)
lookup login
user()
Definition: user.php:4
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getMailObjectRefId()
Determines the reference id of the mail object and stores this information in a local cache variable...
static redirect($a_script)
$_POST["username"]
+ Here is the call graph for this function:

◆ resetContactsTableFilter()

ilContactGUI::resetContactsTableFilter ( )
protected

Definition at line 309 of file class.ilContactGUI.php.

References ilBuddySystem\getInstance(), and showContacts().

310  {
311  if (!ilBuddySystem::getInstance()->isEnabled()) {
312  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
313  }
314 
315  require_once 'Services/Contact/BuddySystem/classes/tables/class.ilBuddySystemRelationsTableGUI.php';
316  $table = new ilBuddySystemRelationsTableGUI($this, 'showContacts');
317 
318  $table->resetOffset();
319  $table->resetFilter();
320 
321  $this->showContacts();
322  }
+ Here is the call graph for this function:

◆ showContactRequests()

ilContactGUI::showContactRequests ( )
private

Definition at line 343 of file class.ilContactGUI.php.

References ilBuddySystem\getInstance(), showContacts(), and ilBuddySystemRelationsTableGUI\STATE_FILTER_ELM_ID.

343  : void
344  {
345  if (!ilBuddySystem::getInstance()->isEnabled()) {
346  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
347  }
348 
349  $table = new ilBuddySystemRelationsTableGUI($this, 'showContacts');
350 
351  $table->resetOffset();
352  $table->resetFilter();
353 
354  $table->applyFilterValue(
356  ilBuddySystemRequestedRelationState::class . '_p'
357  );
358 
359  $this->showContacts();
360 
361  }
+ Here is the call graph for this function:

◆ showContacts()

ilContactGUI::showContacts ( )
protected

Definition at line 327 of file class.ilContactGUI.php.

References activateTab(), and ilBuddySystem\getInstance().

Referenced by applyContactsTableFilter(), mailToUsers(), resetContactsTableFilter(), and showContactRequests().

328  {
329  if (!ilBuddySystem::getInstance()->isEnabled()) {
330  $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
331  }
332 
333  $this->tabs_gui->activateSubTab('buddy_view_table');
334  $this->activateTab('my_contacts');
335 
336  require_once 'Services/Contact/BuddySystem/classes/tables/class.ilBuddySystemRelationsTableGUI.php';
337  $table = new ilBuddySystemRelationsTableGUI($this, 'showContacts');
338  $table->populate();
339  $this->tpl->setContent($table->getHTML());
340  $this->tpl->printToStdout();
341  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSubTabs()

ilContactGUI::showSubTabs ( )
private

Definition at line 181 of file class.ilContactGUI.php.

References ilUtil\getImagePath(), ilSubmitButton\getInstance(), ilBuddySystem\getInstance(), ilBuddyList\getInstanceByGlobalUser(), and help().

Referenced by executeCommand().

182  {
183  if ($this->tabs_gui->hasTabs()) {
184  if (ilBuddySystem::getInstance()->isEnabled()) {
185  $this->tabs_gui->addSubTab('my_contacts', $this->lng->txt('my_contacts'), $this->ctrl->getLinkTarget($this));
186 
187  if (in_array(strtolower($this->ctrl->getCmdClass()), array_map('strtolower', array('ilUsersGalleryGUI', get_class($this))))) {
188  require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
189  $view_selection = new ilSelectInputGUI('', 'contacts_view');
190  $view_selection->setOptions(array(
191  self::CONTACTS_VIEW_TABLE => $this->lng->txt('buddy_view_table'),
192  self::CONTACTS_VIEW_GALLERY => $this->lng->txt('buddy_view_gallery')
193  ));
194  $view_selection->setValue(
195  strtolower($this->ctrl->getCmdClass()) == 'ilusersgallerygui' ? self::CONTACTS_VIEW_GALLERY : self::CONTACTS_VIEW_TABLE
196  );
197  $this->toolbar->addInputItem($view_selection);
198 
199  require_once 'Services/UIComponent/Button/classes/class.ilSubmitButton.php';
200  $contact_view_btn = ilSubmitButton::getInstance();
201  $contact_view_btn->setCaption('show');
202  $contact_view_btn->setCommand('changeContactsView');
203  $this->toolbar->addButtonInstance($contact_view_btn);
204  $this->toolbar->setFormAction($this->ctrl->getFormAction($this, 'changeContactsView'));
205  }
206 
207  if (
208  ilBuddySystem::getInstance()->isEnabled() &&
209  count(ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()) > 0
210  ) {
211  $this->tabs_gui->addSubTab(
212  'mail_my_mailing_lists',
213  $this->lng->txt('mail_my_mailing_lists'),
214  $this->ctrl->getLinkTargetByClass('ilmailinglistsgui')
215  );
216  }
217  }
218 
219  $this->tabs_gui->addSubTab('mail_my_courses', $this->lng->txt('mail_my_courses'), $this->ctrl->getLinkTargetByClass('ilmailsearchcoursesgui'));
220  $this->tabs_gui->addSubTab('mail_my_groups', $this->lng->txt('mail_my_groups'), $this->ctrl->getLinkTargetByClass('ilmailsearchgroupsgui'));
221  $this->has_sub_tabs = true;
222  } else {
223  $this->tpl->setTitleIcon(ilUtil::getImagePath('icon_cadm.svg'));
224 
225  $this->help->setScreenIdComponent('contacts');
226 
227  if (ilBuddySystem::getInstance()->isEnabled()) {
228  $this->tabs_gui->addTab('my_contacts', $this->lng->txt('my_contacts'), $this->ctrl->getLinkTarget($this));
229 
230  if (in_array(strtolower($this->ctrl->getCmdClass()), array_map('strtolower', array('ilUsersGalleryGUI', get_class($this))))) {
231  $this->tabs_gui->addSubTab('buddy_view_table', $this->lng->txt('buddy_view_table'), $this->ctrl->getLinkTarget($this));
232  $this->tabs_gui->addSubTab('buddy_view_gallery', $this->lng->txt('buddy_view_gallery'), $this->ctrl->getLinkTargetByClass('ilUsersGalleryGUI'));
233  }
234 
235  if (
236  ilBuddySystem::getInstance()->isEnabled() &&
237  count(ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()) > 0
238  ) {
239  $this->tabs_gui->addTab(
240  'mail_my_mailing_lists',
241  $this->lng->txt('mail_my_mailing_lists'),
242  $this->ctrl->getLinkTargetByClass('ilmailinglistsgui')
243  );
244  }
245  }
246 
247  $this->tabs_gui->addTab('mail_my_courses', $this->lng->txt('mail_my_courses'), $this->ctrl->getLinkTargetByClass('ilmailsearchcoursesgui'));
248  $this->tabs_gui->addTab('mail_my_groups', $this->lng->txt('mail_my_groups'), $this->ctrl->getLinkTargetByClass('ilmailsearchgroupsgui'));
249  }
250  }
static getInstanceByGlobalUser()
help()
Definition: help.php:2
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ submitInvitation()

ilContactGUI::submitInvitation ( )

Last step of chat invitations check access for every selected user and send invitation.

Definition at line 415 of file class.ilContactGUI.php.

References $_POST, $login, $message, $url, ilLink\_getStaticLink(), ilObjUser\_lookupLogin(), ilChatroom\byRoomId(), ilChatroom\checkPermissionsOfUser(), inviteToChat(), ilUtil\sendFailure(), ilUtil\sendInfo(), and user().

416  {
417  if (!isset($_POST['usr_id']) || !strlen($_POST['usr_id'])) {
418  ilUtil::sendInfo($this->lng->txt('select_one'), true);
419  $this->ctrl->redirect($this);
420  }
421 
422  if (!$_POST['room_id']) {
423  ilUtil::sendInfo($this->lng->txt('select_one'));
424  $_POST['usr_id'] = explode(',', $_POST['usr_id']);
425  $this->inviteToChat();
426  return;
427  }
428 
429  // get selected users (comma seperated user id list)
430  $usr_ids = explode(',', $_POST['usr_id']);
431 
432  // get selected chatroom from POST-String, format: "room_id , scope"
433  $room_ids = explode(',', $_POST['room_id']);
434  $room_id = (int) $room_ids[0];
435  $scope = 0;
436 
437  if (count($room_ids) > 0) {
438  $scope = (int) $room_ids[1];
439  }
440 
441  include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
442 
443  $room = ilChatroom::byRoomId((int) $room_id, true);
444  $no_access = array();
445  $no_login = array();
446  $valid_users = array();
447  $valid_user_to_login_map = array();
448 
449  foreach ($usr_ids as $usr_id) {
450  $login = ilObjUser::_lookupLogin($usr_id);
451  if (!strlen($login)) {
452  $no_login[$usr_id] = $usr_id;
453  continue;
454  }
455 
456  $ref_id = $room->getRefIdByRoomId($room_id);
457 
458  if (
459  !ilChatroom::checkPermissionsOfUser($usr_id, 'read', $ref_id) ||
460  $room->isUserBanned($usr_id)
461  ) {
462  $no_access[$usr_id] = $login;
463  } else {
464  $valid_users[$usr_id] = $usr_id;
465  $valid_user_to_login_map[$usr_id] = $login;
466  }
467  }
468 
469  if (count($no_access) || count($no_login)) {
470  $message = '';
471 
472  if (count($no_access) > 0) {
473  $message .= $this->lng->txt('chat_users_without_permission') . ':<br>';
474  $list = '';
475 
476  foreach ($no_access as $usr_id => $login) {
477  $list .= '<li>' . $login . '</li>';
478  }
479 
480  $message .= '<ul>';
481  $message .= $list;
482  $message .= '</ul>';
483  }
484 
485  if (count($no_login)) {
486  $message .= $this->lng->txt('chat_users_without_login') . ':<br>';
487  $list = '';
488 
489  foreach ($no_login as $usr_id) {
490  $list .= '<li>' . $usr_id . '</li>';
491  }
492 
493  $message .= '<ul>';
494  $message .= $list;
495  $message .= '</ul>';
496  }
497 
499  $_POST['usr_id'] = $usr_ids;
500  $this->inviteToChat();
501  return;
502  }
503 
504  $ref_id = $room->getRefIdByRoomId($room_id);
505 
506  require_once 'Services/Link/classes/class.ilLink.php';
507  if ($scope) {
508  $url = ilLink::_getStaticLink($ref_id, 'chtr', true, '_' . $scope);
509  } else {
510  $url = ilLink::_getStaticLink($ref_id, 'chtr');
511  }
512  $link = '<p><a target="chatframe" href="' . $url . '" title="' . $this->lng->txt('goto_invitation_chat') . '">' . $this->lng->txt('goto_invitation_chat') . '</a></p>';
513 
514  $userlist = array();
515  foreach ($valid_users as $id) {
516  $room->inviteUserToPrivateRoom($id, $scope);
517  $room->sendInvitationNotification(
518  null,
519  $this->user->getId(),
520  $id,
521  (int) $scope,
522  $url
523  );
524  $userlist[] = '<li>' . $valid_user_to_login_map[$id] . '</li>';
525  }
526 
527  if ($userlist) {
528  ilUtil::sendSuccess($this->lng->txt('chat_users_have_been_invited') . '<ul>' . implode('', $userlist) . '</ul>' . $link, true);
529  }
530 
531  $this->ctrl->redirect($this);
532  }
static _lookupLogin($a_user_id)
lookup login
$login
Definition: cron.php:13
static byRoomId($room_id, $initObject=false)
Returns ilChatroom by given $room_id.
inviteToChat()
Send chat invitations to selected Users.
user()
Definition: user.php:4
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$message
Definition: xapiexit.php:14
$url
static checkPermissionsOfUser($usr_id, $permissions, $ref_id)
Checks user permissions in question for a given user id in relation to a given ref_id.
$_POST["username"]
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilContactGUI::$ctrl
protected

Definition at line 28 of file class.ilContactGUI.php.

◆ $error

ilContactGUI::$error
protected

Definition at line 63 of file class.ilContactGUI.php.

◆ $has_sub_tabs

ilContactGUI::$has_sub_tabs = false
protected

Definition at line 73 of file class.ilContactGUI.php.

◆ $help

ilContactGUI::$help
protected

Definition at line 43 of file class.ilContactGUI.php.

◆ $lng

ilContactGUI::$lng
protected

Definition at line 33 of file class.ilContactGUI.php.

◆ $rbacsystem

ilContactGUI::$rbacsystem
protected

Definition at line 68 of file class.ilContactGUI.php.

◆ $tabs_gui

ilContactGUI::$tabs_gui
protected

Definition at line 38 of file class.ilContactGUI.php.

◆ $toolbar

ilContactGUI::$toolbar
protected

Definition at line 48 of file class.ilContactGUI.php.

◆ $tpl

ilContactGUI::$tpl
protected

Definition at line 23 of file class.ilContactGUI.php.

◆ $umail

ilContactGUI::$umail
protected

Definition at line 53 of file class.ilContactGUI.php.

◆ $user

ilContactGUI::$user
protected

Definition at line 58 of file class.ilContactGUI.php.

◆ CONTACTS_VIEW_GALLERY

const ilContactGUI::CONTACTS_VIEW_GALLERY = 1

Definition at line 17 of file class.ilContactGUI.php.

◆ CONTACTS_VIEW_TABLE

const ilContactGUI::CONTACTS_VIEW_TABLE = 2

Definition at line 18 of file class.ilContactGUI.php.


The documentation for this class was generated from the following file: