ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSystemSupportContacts.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
13 {
19  public static function getList()
20  {
21  global $DIC;
22 
23  $ilSetting = $DIC->settings();
24 
25  return $ilSetting->get("adm_support_contacts");
26  }
27 
33  public static function setList($a_list)
34  {
35  global $DIC;
36 
37  $ilSetting = $DIC->settings();
38 
39  $list = explode(",", $a_list);
40  $accounts = array();
41  foreach ($list as $l) {
42  if (ilObjUser::_lookupId(trim($l)) > 0) {
43  $accounts[] = trim($l);
44  }
45  }
46 
47  return $ilSetting->set("adm_support_contacts", implode(",", $accounts));
48  }
49 
55  public static function getValidSupportContactIds()
56  {
57  $list = self::getList();
58  $list = explode(",", $list);
59 
60  return ilObjUser::_lookupId($list);
61  }
62 
69  public static function getMailsToAddress()
70  {
71  $emails = array();
72  foreach (self::getValidSupportContactIds() as $id) {
73  if (($e = ilObjUser::_lookupEmail($id)) != "") {
74  $emails[] = $e;
75  }
76  }
77  if (!empty($emails)) {
78  $emails = implode(',', $emails);
79  if (trim($emails)) {
80  return $emails;
81  }
82  }
83  return "";
84  }
85 }
static setList($a_list)
Set list.
static _lookupId($a_user_str)
global $DIC
Definition: feed.php:28
static getMailsToAddress()
Get mailto: emails.
global $ilSetting
Definition: privfeed.php:17
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getValidSupportContactIds()
Get valid support contacts.
static _lookupEmail(int $a_user_id)