From 1571234ca920f8263ec86c709cfd5522dfa8428f Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Mon, 4 Dec 2023 16:02:48 -0500 Subject: [PATCH 1/3] [libraries] Get examiner sites by UserID --- php/libraries/User.class.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/libraries/User.class.inc b/php/libraries/User.class.inc index f41bbea209f..46a5a3dba8b 100644 --- a/php/libraries/User.class.inc +++ b/php/libraries/User.class.inc @@ -122,12 +122,12 @@ class User extends UserPermissions implements epr.pending_approval FROM examiners e JOIN examiners_psc_rel epr ON (e.examinerID=epr.examinerID) - WHERE e.full_name=:fn + WHERE e.userID=:uid AND (epr.active='Y' OR (epr.active='N' AND epr.pending_approval='Y') )", [ - "fn" => $row['Real_name'], + "uid" => $row['ID'], ] ); From 4cb43aa5e56a95ae5eda6297fc352c900e543d17 Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Tue, 5 Dec 2023 11:35:16 -0500 Subject: [PATCH 2/3] Fix unit test --- test/unittests/UserTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unittests/UserTest.php b/test/unittests/UserTest.php index 1a57b15ad1c..3ae38f133e8 100644 --- a/test/unittests/UserTest.php +++ b/test/unittests/UserTest.php @@ -105,6 +105,7 @@ class UserTest extends TestCase * @var array */ private $_examinerInfo = [0 => ['full_name' => 'John Doe', + 'userID' => '1', 'examinerID' => 1, 'radiologist' => 1 ] From a11ea2b9d63eafe369a788781b5fa35e94e4e3cf Mon Sep 17 00:00:00 2001 From: CamilleBeau Date: Tue, 5 Dec 2023 11:46:07 -0500 Subject: [PATCH 3/3] alignment --- test/unittests/UserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittests/UserTest.php b/test/unittests/UserTest.php index 3ae38f133e8..5101543117a 100644 --- a/test/unittests/UserTest.php +++ b/test/unittests/UserTest.php @@ -105,7 +105,7 @@ class UserTest extends TestCase * @var array */ private $_examinerInfo = [0 => ['full_name' => 'John Doe', - 'userID' => '1', + 'userID' => '1', 'examinerID' => 1, 'radiologist' => 1 ]