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