From c21ab769002e332c1081021d9e364f9e5e6d96ad Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Sun, 15 Dec 2019 12:54:28 +0100 Subject: [PATCH] Better fix (#2005) --- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm index 7e6165b55..40712e553 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm @@ -164,7 +164,7 @@ sub refresh { my ( $self, $req ) = @_; $req->mustRedirect(1); my %data = %{ $req->userData }; - $req->user( $data{ $self->conf->{whatToTrace} } ); + $req->user( $data{_user} || $data{ $self->conf->{whatToTrace} } ); $req->id( $data{_session_id} ); $self->userLogger->notice( 'Refresh request for ' . $req->user ); foreach ( keys %data ) { @@ -174,8 +174,8 @@ sub refresh { $self->logger->debug( "Set session $req->{id} _updateTime with $data{_updateTime}"); $req->steps( [ - #'getUser', Fix #2005 - #@{ $self->betweenAuthAndData }, + 'getUser', + @{ $self->betweenAuthAndData }, 'setAuthSessionInfo', 'setSessionInfo', 'setMacros', @@ -237,7 +237,7 @@ sub do { } # Remove userData if authentication fails - if ( $err == PE_BADCREDENTIALS or $err == PE_BADOTP) { + if ( $err == PE_BADCREDENTIALS or $err == PE_BADOTP ) { $req->userData( {} ); }