From 2418a31a778e86a90e9a741db177fe163d4e41b9 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse <guillaume.rousse@renater.fr> Date: Thu, 9 Nov 2017 17:05:11 +0100 Subject: [PATCH] use shorter variable names --- lib/IdPAccountManager/WebRequest.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm index 06d3b15..abc944a 100755 --- a/lib/IdPAccountManager/WebRequest.pm +++ b/lib/IdPAccountManager/WebRequest.pm @@ -462,20 +462,20 @@ sub req_validate_token { } ## create test accounts - my @test_accounts; + my @accounts; foreach my $profile (split(/, */, $self->{configuration}->{account_profiles})) { - my $test_account = IdPAccountManager::Data::TestAccount->new( + my $account = IdPAccountManager::Data::TestAccount->new( db => $self->{db}, account_profile => $profile, sp_entityid => $self->{in}->{sp_entityid} ); - next unless $test_account; - next unless $test_account->save(); - push @test_accounts, $test_account; + next unless $account; + next unless $account->save(); + push @accounts, $account; } - unless (@test_accounts) { + unless (@accounts) { push @{ $self->{out}->{errors} }, "accounts_creation_failed"; $self->{logger}->errorf( "Failed to create test accounts for SP with entityid %s", @@ -487,7 +487,7 @@ sub req_validate_token { ## Update simpleSAMLphp configuration to enable test accounts unless (IdPAccountManager::Tools::update_ssp_authsources( $self->{configuration}->{templates_dir}, - $self->{configuration}->{idp_accounts_file} + $self->{configuration}->{idp_accounts_file}, )) { push @{ $self->{out}->{errors} }, "accounts_creation_failed"; $self->{logger}->error( @@ -503,7 +503,7 @@ sub req_validate_token { ); $self->{out}->{sp_entityid} = $self->{in}->{sp_entityid}; - $self->{out}->{test_accounts} = \@test_accounts; + $self->{out}->{test_accounts} = \@accounts; $self->{out}->{subtitle} = 'Complete Email Challenge'; return 1; -- GitLab