ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ?>
static setList($a_list)
Set list.
static _lookupId($a_user_str)
Lookup id by login.
static getMailToAddress()
Get mailto: email.
Create styles array
The data for the language used.
global $l
Definition: afr.php:30
global $ilSetting
Definition: privfeed.php:17
static _lookupEmail($a_user_id)
Lookup email.
static getValidSupportContactIds()
Get valid support contacts.