roundcubemail/plugins/virtuser_file/virtuser_file.php
private function findinvirtual($pattern)
    {
        $result = array();
        $virtual = null;

        if ($this->file)
            $virtual = file($this->file);

        if (empty($virtual))
            return $result;

        // check each line for matches
        foreach ($virtual as $line) {
            $line = trim($line);
            if (empty($line) || $line[0]=='#')
                continue;

            if (preg_match($pattern, $line))
                $result[] = $line;
        }

        return $result;
    }
private function findinvirtual($pattern)
    {
        $result = array();
        $virtual = null;

        if ($this->file)
            $virtual = file($this->file);

        if (empty($virtual))
            return $result;

        // check each line for matches
        foreach ($virtual as $line) {
            $line = trim($line);
            if (empty($line) || $line[0]=='#')
                continue;

            if (preg_match($pattern, $line))
                $result[] = $line;
        }

        return $result;
    }
private function findinvirtual ( $ pattern ) { $ result = array ( ) ; $ virtual = null ; if ( $ this -> file ) $ virtual = file ( $ this -> file ) ; if ( empty ( $ virtual ) ) return $ result ; // check each line for matches foreach ( $ virtual as $ line ) { $ line = trim ( $ line ) ; if ( empty ( $ line ) || $ line [ 0 ] == '#' ) continue ; if ( preg_match ( $ pattern , $ line ) ) $ result [ ] = $ line ; } return $ result ; }
Find matches of the given pattern in virtuser file

@param string Regular expression to search for
@return array Matching entries
Find matches of the given pattern in virtuser file