82        $parser = $this->parserFactory->getParser($a_address_list);
 
   86        foreach ($parsedList as $address) {
 
   87            $local_part = $address->getMailbox();
 
   88            if (strpos($local_part, 
'#') !== 0 && !($local_part[0] == 
'"' && $local_part[1] == 
"#")) {
 
   94            $local_part = substr($local_part, 1);
 
   97            if ($local_part[0] == 
'#' && $local_part[strlen($local_part) - 1] == 
'"') {
 
   98                $local_part = substr($local_part, 1);
 
   99                $local_part = substr($local_part, 0, strlen($local_part) - 1);
 
  102            if (substr($local_part, 0, 8) == 
'il_role_') {
 
  103                $role_id = substr($local_part, 8);
 
  104                $query = 
"SELECT t.tree " .
 
  106                    "JOIN tree t ON t.child = fa.parent " .
 
  107                    "WHERE fa.rol_id = " . $this->db->quote($role_id, 
'integer') . 
" " .
 
  108                    "AND fa.assign = 'y' " .
 
  111                if ($this->db->numRows(
$res) > 0) {
 
  112                    $role_ids[] = $role_id;
 
  121            if (strlen($local_part) == 0) {
 
  129                $query = 
"SELECT dat.obj_id " .
 
  130                    "FROM object_data dat " .
 
  131                    "JOIN rbac_fa fa ON fa.rol_id = dat.obj_id " .
 
  132                    "JOIN tree t ON t.child = fa.parent " .
 
  133                    "WHERE dat.title =" . $this->db->quote($local_part, 
'text') . 
" " .
 
  134                    "AND dat.type = 'role' " .
 
  135                    "AND fa.assign = 'y' " .
 
  139                $query = 
"SELECT rdat.obj_id " .
 
  140                    "FROM object_data odat " .
 
  141                    "JOIN object_reference oref ON oref.obj_id = odat.obj_id " .
 
  142                    "JOIN tree otree ON otree.child = oref.ref_id " .
 
  143                    "JOIN rbac_fa rfa ON rfa.parent = otree.child " .
 
  144                    "JOIN object_data rdat ON rdat.obj_id = rfa.rol_id " .
 
  145                    "WHERE odat.title = " . $this->db->quote(
$domain, 
'text') . 
" " .
 
  146                    "AND otree.tree = 1 " .
 
  147                    "AND rfa.assign = 'y' " .
 
  148                    "AND rdat.title LIKE " .
 
  149                    $this->db->quote(
'%' . preg_replace(
'/([_%])/', 
'\\\\$1', $local_part) . 
'%', 
'text');
 
  154            while (
$row = $this->db->fetchAssoc(
$res)) {
 
  155                $role_ids[] = 
$row[
'obj_id'];
 
  163                $q = 
"SELECT dat.obj_id " .
 
  164                    "FROM object_data dat " .
 
  165                    "JOIN object_reference ref ON ref.obj_id = dat.obj_id " .
 
  166                    "JOIN tree t ON t.child = ref.ref_id " .
 
  167                    "WHERE dat.title = " . $this->db->quote(
$domain, 
'text') . 
" " .
 
  168                    "AND dat.type = 'role' " .
 
  170                $res = $this->db->query($q);
 
  172                while (
$row = $this->db->fetchAssoc(
$res)) {
 
  173                    $role_ids[] = 
$row[
'obj_id'];
 
if(!array_key_exists('domain', $_REQUEST)) $domain
An exception for terminatinating execution or to throw for unit testing.
Class ilMailRfc822AddressParserFactory.
Class ilRoleMailboxSearch.
searchRoleIdsByAddressString(string $a_address_list)
Finds all role ids that match the specified user friendly role mailbox address list.
__construct(\ilMailRfc822AddressParserFactory $parserFactory, \ilDBInterface $db=null)
ilRoleMailboxSearch constructor.
foreach($_POST as $key=> $value) $res