unless ($CurrentUser->Id) {
my ( $found, %params );
- while (not $found) {
- my @auth_services = @$RT::ExternalAuthPriority;
- for my $service (@auth_services) {
- my $config = $RT::ExternalSettings->{$service};
- my $lookup_attr = $config->{'lookup_attr_map'}->{'EmailAddress'};
- next unless ($config->{'type'} eq 'ldap');
- ($found, %params) =
- RT::Authen::ExternalAuth::LDAP::CanonicalizeUserInfo ( $service, $lookup_attr, $Address );
- $CurrentUser->LoadByName( %params->{'Name'} ) if $found;
- }
+ my @auth_services = @$RT::ExternalAuthPriority;
+ for my $service (@auth_services) {
+ my $config = $RT::ExternalSettings->{$service};
+ my $lookup_attr = $config->{'lookup_attr_map'}->{'EmailAddress'};
+ next unless ($config->{'type'} eq 'ldap');
+ ($found, %params) =
+ RT::Authen::ExternalAuth::LDAP::CanonicalizeUserInfo ( $service, $lookup_attr, $Address );
+ $CurrentUser->LoadByName( %params->{'Name'} ) if $found;
+ last if $found;
}
}