diff options
Diffstat (limited to 'lib/MGA/Git.pm')
-rw-r--r-- | lib/MGA/Git.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/MGA/Git.pm b/lib/MGA/Git.pm index 396e319..a9c0722 100644 --- a/lib/MGA/Git.pm +++ b/lib/MGA/Git.pm @@ -68,8 +68,7 @@ sub get_ldap { sub re { my ($re, $txt) = @_; my $rr = qr/$config->{$re}/; - $txt =~ s/$rr/$1/; - return $txt; + return $txt =~ m/$rr/ ? $1 : undef; } sub load_groups { @@ -82,7 +81,7 @@ sub load_groups { ); my $res = $m->as_struct; @{$r->{groups}}{map { re('group_re', $_) } keys %$res} = - map { [ map { re('uid_username_re', $_) } @{$_->{member}} ] } + map { [ map { re('uid_username_re', $_) || () } @{$_->{member}} ] } values %$res; } |