ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilAccessibilitySupportContacts.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
17 public static function getList()
18 {
19 global $DIC;
20
21 $ilSetting = $DIC->settings();
22
23 return $ilSetting->get("accessibility_support_contacts");
24 }
25
31 public static function setList($a_list)
32 {
33 global $DIC;
34
35 $ilSetting = $DIC->settings();
36
37 $list = explode(",", $a_list);
38 $accounts = array();
39 foreach ($list as $l) {
40 if (ilObjUser::_lookupId(trim($l)) > 0) {
41 $accounts[] = trim($l);
42 }
43 }
44
45 return $ilSetting->set("accessibility_support_contacts", implode(",", $accounts));
46 }
47
53 public static function getValidSupportContactIds()
54 {
55 $list = self::getList();
56 $list = explode(",", $list);
57
58 return ilObjUser::_lookupId($list);
59 }
60
61 /*
62 * Get mailto: emails
63 */
64 public static function getMailsToAddress()
65 {
66 $emails = array();
67 foreach (self::getValidSupportContactIds() as $id) {
68 if (($e = ilObjUser::_lookupEmail($id)) != "") {
69 $emails[] = $e;
70 }
71 }
72 if (!empty($emails)) {
73 $emails = implode(',', $emails);
74 if (trim($emails)) {
75 return $emails;
76 }
77 }
78 return "";
79 }
80}
An exception for terminatinating execution or to throw for unit testing.
Class ilAccessibilitySupportContacts.
static getValidSupportContactIds()
Get valid support contacts.
static _lookupEmail($a_user_id)
Lookup email.
static _lookupId($a_user_str)
Lookup id by login.
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17