From bd47322a153b25f8b3e10183f07e57686b407361 Mon Sep 17 00:00:00 2001 From: ellie timoney Date: Wed, 4 Dec 2024 11:14:38 +1100 Subject: [PATCH] WIP Instance: let create_user take Cassandane::Mboxname subdirs --- cassandane/Cassandane/Instance.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cassandane/Cassandane/Instance.pm b/cassandane/Cassandane/Instance.pm index dac86ffcba..d8052f8b76 100644 --- a/cassandane/Cassandane/Instance.pm +++ b/cassandane/Cassandane/Instance.pm @@ -1073,8 +1073,15 @@ sub create_user my $adminclient = $adminstore->get_client(); my @mboxes = ( $mb->to_external() ); - map { push(@mboxes, $mb->make_child($_)->to_external()); } @{$params{subdirs}} - if ($params{subdirs}); + foreach my $subdir (defined $params{subdirs} ? @{$params{subdirs}} : ()) + { + if (ref $subdir eq 'Cassandane::Mboxname') { + push(@mboxes, $subdir->to_external()); + } + else { + push(@mboxes, $mb->make_child($subdir)->to_external()); + } + } foreach my $mb (@mboxes) {