From e3bfd193c3e8fc23cc86cb2a8a381997a949cfc0 Mon Sep 17 00:00:00 2001 From: wainuiwitikapark Date: Fri, 14 Aug 2026 00:47:52 +0000 Subject: [PATCH] RMAINT perltidy C4/SIP/Sip/MsgType.pm and t/db_dependent/SIP/MsgType.t from Bug 42847 Signed-off-by: Wainui Witika-Park --- C4/SIP/Sip/MsgType.pm | 2 +- t/db_dependent/SIP/MsgType.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm index 32fed467c3..c9d803bc69 100644 --- a/C4/SIP/Sip/MsgType.pm +++ b/C4/SIP/Sip/MsgType.pm @@ -933,7 +933,6 @@ sub login_core { # authenticated terminal. Only a successful api_auth below re-establishes the session. delete $server->{$_} foreach qw( account ils institution policy sip_username sip_password ); - if ( !exists( $server->{config}->{accounts}->{$uid} ) ) { siplog( "LOG_WARNING", "MsgType::login_core: Unknown login '$uid'" ); $status = 0; @@ -953,6 +952,7 @@ sub login_core { ); $status = 0; } else { + # Store the active account configuration now user has authenticated $server->{account} = $server->{config}->{accounts}->{$uid}; $server->{institution} = $server->{config}->{institutions}->{$inst}; diff --git a/t/db_dependent/SIP/MsgType.t b/t/db_dependent/SIP/MsgType.t index d439d83348..eb8bdfcce2 100755 --- a/t/db_dependent/SIP/MsgType.t +++ b/t/db_dependent/SIP/MsgType.t @@ -361,7 +361,7 @@ subtest 'login_core() authentication tests' => sub { return { config => { accounts => { $uid => { id => $uid, institution => 'CPL', password => 'goodpw' } }, - institutions => { CPL => { id => 'CPL', implementation => 'ILS', policy => {} } }, + institutions => { CPL => { id => 'CPL', implementation => 'ILS', policy => {} } }, }, }; };