use splice() to have a clean code in methods
This commit is contained in:
parent
9dee0a698d
commit
f023778623
|
@ -415,11 +415,7 @@ sub ldap {
|
||||||
# @param attributes to get from found groups (array ref)
|
# @param attributes to get from found groups (array ref)
|
||||||
# @return string groups separated with multiValuesSeparator
|
# @return string groups separated with multiValuesSeparator
|
||||||
sub searchGroups {
|
sub searchGroups {
|
||||||
my $self = shift;
|
my ($self, $base, $key, $value, $attributes) = splice @_;
|
||||||
my $base = shift;
|
|
||||||
my $key = shift;
|
|
||||||
my $value = shift;
|
|
||||||
my $attributes = shift;
|
|
||||||
|
|
||||||
my $portal = $self->{portal};
|
my $portal = $self->{portal};
|
||||||
my $groups;
|
my $groups;
|
||||||
|
@ -502,9 +498,7 @@ sub searchGroups {
|
||||||
# @param attribute Attribute name
|
# @param attribute Attribute name
|
||||||
# @return string value
|
# @return string value
|
||||||
sub getLdapValue {
|
sub getLdapValue {
|
||||||
my $self = shift;
|
my ($self, $entry, $attribute) = splice @_;
|
||||||
my $entry = shift;
|
|
||||||
my $attribute = shift;
|
|
||||||
|
|
||||||
return $entry->dn() if ( $attribute eq "dn" );
|
return $entry->dn() if ( $attribute eq "dn" );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user