ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMailOnlyExternalAddressList.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
9{
11 protected $origin;
12
15
22 {
23 $this->origin = $origin;
24 $this->installationHost = $installationHost;
25 }
26
30 public function value() : array
31 {
32 $addresses = $this->origin->value();
33
34 $filteredAddresses = array_filter($addresses, function (\ilMailAddress $address) {
35 if (\ilObjUser::_lookupId((string) $address)) {
36 // Fixed mantis bug #5875
37 return false;
38 }
39
40 if ($address->getHost() === $this->installationHost) {
41 return false;
42 }
43
44 if ('#' === substr($address->getMailbox(), 0, 1)) {
45 return false;
46 }
47
48 return true;
49 });
50
51 return $filteredAddresses;
52 }
53}
An exception for terminatinating execution or to throw for unit testing.
Class ilMailAddress.
Class ilMailOnlyExternalAddressList.
__construct(\ilMailAddressList $origin, string $installationHost)
ilMailOnlyExternalAddressList constructor.
static _lookupId($a_user_str)
Lookup id by login.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
Interface ilMailAddressList.