Skip to content

Commit

Permalink
Old user might not be set
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Mar 1, 2024
1 parent b877fe1 commit 59b58c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virtual_feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ sub mailbox_save
my @dirs = &htaccess_htpasswd::list_directories();
@dirs = grep { &can_directory($_->[0], $dom) } @dirs;
return undef if (!@dirs);
my %indir = &get_in_dirs(\@dirs, $old->{'user'});
my %indir = $old ? &get_in_dirs(\@dirs, $old->{'user'}) : ( );
my $count = 0;

# Update them all
Expand Down Expand Up @@ -155,7 +155,7 @@ sub mailbox_modify
# Find protected directories
my @dirs = &htaccess_htpasswd::list_directories();
@dirs = grep { &can_directory($_->[0], $dom) } @dirs;
my %indir = &get_in_dirs(\@dirs, $old->{'user'});
my %indir = $old ? &get_in_dirs(\@dirs, $old->{'user'}) : ( );

# Update the user
foreach my $d (@dirs) {
Expand Down

0 comments on commit 59b58c8

Please sign in to comment.