Improve code (#2093)

merge-requests/133/head
Christophe Maudoux 5 years ago
parent 0bb16fd2db
commit 9a8d668c61
  1. 7
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckUser.pm

@ -492,12 +492,11 @@ sub _splitAttributes {
sub _removePersistentAttributes {
my ( $self, $attrs ) = @_;
my $regex = join '|', split /\s+/, $self->persistentAttrs;
my %attributes = %$attrs;
my @keys = grep /$regex/, keys %attributes;
my @keys = grep /$regex/, keys %$attrs;
$self->logger->debug("Remove persistent session attributes");
delete @attributes{@keys};
delete @$attrs{@keys};
return \%attributes;
return $attrs;
}
1;

Loading…
Cancel
Save