ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilAccessibilitySupportContacts.php
Go to the documentation of this file.
1 <?php
2 
26 {
32  public static function getList()
33  {
34  global $DIC;
35 
36  $ilSetting = $DIC->settings();
37 
38  return $ilSetting->get("accessibility_support_contacts") ?? '';
39  }
40 
46  public static function setList(string $a_list)
47  {
48  global $DIC;
49 
50  $ilSetting = $DIC->settings();
51 
52  $list = explode(",", $a_list);
53  $accounts = array();
54  foreach ($list as $l) {
55  if (ilObjUser::_lookupId(trim($l)) > 0) {
56  $accounts[] = trim($l);
57  }
58  }
59 
60  return $ilSetting->set("accessibility_support_contacts", implode(",", $accounts));
61  }
62 
68  public static function getValidSupportContactIds()
69  {
70  $list = self::getList();
71  $list = explode(",", $list);
72 
73  return ilObjUser::_lookupId($list);
74  }
75 
76  /*
77  * Get mailto: emails
78  */
79  public static function getMailsToAddress()
80  {
81  $emails = array();
82  foreach (self::getValidSupportContactIds() as $id) {
83  if (($e = ilObjUser::_lookupEmail($id)) != "") {
84  $emails[] = $e;
85  }
86  }
87  if (!empty($emails)) {
88  $emails = implode(',', $emails);
89  if (trim($emails)) {
90  return $emails;
91  }
92  }
93  return "";
94  }
95 }
static _lookupId($a_user_str)
global $DIC
Definition: shib_login.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $ilSetting
Definition: privfeed.php:32
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
static getValidSupportContactIds()
Get valid support contacts.
static _lookupEmail(int $a_user_id)