roundcubemail/plugins/virtuser_file/virtuser_file.php
function email2user($p)
    {
        $r = $this->findinvirtual('/^' . preg_quote($p['email'], '/') . '\s/');

        for ($i=0; $i<count($r); $i++) {
            $arr = preg_split('/\s+/', trim($r[$i]));

            if (count($arr) > 0) {
                $p['user'] = trim($arr[count($arr)-1]);
                break;
            }
        }

        return $p;
    }
function email2user($p)
    {
        $r = $this->findinvirtual('/^' . preg_quote($p['email'], '/') . '\s/');

        for ($i=0; $i<count($r); $i++) {
            $arr = preg_split('/\s+/', trim($r[$i]));

            if (count($arr) > 0) {
                $p['user'] = trim($arr[count($arr)-1]);
                break;
            }
        }

        return $p;
    }
function email2user ( $ p ) { $ r = $ this -> findinvirtual ( '/^' . preg_quote ( $ p [ 'email' ] , '/' ) . '\s/' ) ; for ( $ i = 0 ; $ i < count ( $ r ) ; $ i ++ ) { $ arr = preg_split ( '/\s+/' , trim ( $ r [ $ i ] ) ) ; if ( count ( $ arr ) > 0 ) { $ p [ 'user' ] = trim ( $ arr [ count ( $ arr ) - 1 ] ) ; break ; } } return $ p ; }
Email > User
Email > User