X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAuthentication%2FStore%2FLDAP%2FBackend.pm;h=b8977040f4b18588048c78a60b28c3ab499d594b;hb=ab62b426562470d4ffc97953ad15a3f5fca88008;hp=cef2d353fac7f09caf3b4516a0faa2d88b6cc2b2;hpb=1404e8595030cfbf1224787906eaba2029749ff0;p=catagits%2FCatalyst-Authentication-Store-LDAP.git diff --git a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm index cef2d35..b897704 100644 --- a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm +++ b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm @@ -395,14 +395,8 @@ sub lookup_roles { } my $rolesearch = $ldap->search(@searchopts); my @roles; -RESULT: while ( my $entry = $rolesearch->pop_entry ) { - my ($role) = $entry->get_value( $self->role_field ); - if ($role) { - push( @roles, $role ); - } - else { - next RESULT; - } +RESULT: foreach my $entry ( $rolesearch->entries ) { + push( @roles, $entry->get_value( $self->role_field ) ); } return @roles; }