Skip to content

Commit a730985

Browse files
author
Marcin Przepiorowski
committed
issue #154
1 parent ee84b4e commit a730985

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

lib/Engine.pm

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -766,19 +766,15 @@ sub getCurrentUser {
766766

767767
logger($self->{_debug}, "Entering Engine::getCurrentUser",1);
768768

769-
if ($self->{_currentuser} eq '') {
770-
771-
my $operation = "resources/json/delphix/user/current";
772-
my ($result, $result_fmt) = $self->getJSONResult($operation);
773-
774-
if (defined($result->{status}) && ($result->{status} eq 'OK')) {
775-
$ret = $result->{result};
776-
$self->{_currentuser} = $ret->{name};
777-
$self->{_currentusertype} = $ret->{userType};
778-
} else {
779-
print "No data returned for $operation. Try to increase timeout \n";
780-
}
769+
my $operation = "resources/json/delphix/user/current";
770+
my ($result, $result_fmt) = $self->getJSONResult($operation);
781771

772+
if (defined($result->{status}) && ($result->{status} eq 'OK')) {
773+
$ret = $result->{result};
774+
$self->{_currentuser} = $ret->{name};
775+
$self->{_currentusertype} = $ret->{userType};
776+
} else {
777+
print "No data returned for $operation. Try to increase timeout \n";
782778
}
783779

784780
return $self->{_currentuser};

0 commit comments

Comments
 (0)