ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 static function getList()
20 {
21 global $ilSetting;
22
23 return $ilSetting->get("adm_support_contacts");
24 }
25
31 static function setList($a_list)
32 {
33 global $ilSetting;
34
35 $list = explode(",", $a_list);
36 $accounts = array();
37 foreach ($list as $l)
38 {
39 if (ilObjUser::_lookupId(trim($l)) > 0)
40 {
41 $accounts[] = trim($l);
42 }
43 }
44
45 return $ilSetting->set("adm_support_contacts", implode(",", $accounts));
46 }
47
53 static function getValidSupportContactIds()
54 {
55 $list = self::getList();
56 $list = explode(",", $list);
57
58 return ilObjUser::_lookupId($list);
59 }
60
67 static function getMailToAddress()
68 {
69 $emails = array();
70 foreach (self::getValidSupportContactIds() as $id)
71 {
72 if (($e = ilObjUser::_lookupEmail($id)) != "")
73 {
74 return $e;
75 }
76 }
77 return "";
78 }
79}
80
81?>
global $l
Definition: afr.php:30
static _lookupId($a_user_str)
Lookup id by login.
_lookupEmail($a_user_id)
Lookup email.
static getValidSupportContactIds()
Get valid support contacts.
static getMailToAddress()
Get mailto: email.
global $ilSetting
Definition: privfeed.php:40