removed redundant data structure part in commit count
[scpubgit/System-Introspector.git] / lib / System / Introspector / Probe / Users.pm
index 0327bb7..e0baa5b 100644 (file)
@@ -78,7 +78,8 @@ sub _gather_ssh_keys {
 sub _gather_user_groups {
     my ($self, $user) = @_;
     my $groups = output_from_command [groups => $user];
-    $groups =~ s{^ \Q$user\E \s* : \s* }{}x;
+    chomp $groups;
+    $groups =~ s{^ .* : \s* }{}x;
     return [split m{\s+}, $groups];
 }