From 97ed40286b895f2d3a549f15974bd6b01c8a538e Mon Sep 17 00:00:00 2001 From: Demian Katz Date: Wed, 17 Apr 2024 06:54:08 -0400 Subject: [PATCH] LibraryCardController: use entity interfaces. (#3588) --- .../src/VuFind/Controller/LibraryCardsController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/VuFind/src/VuFind/Controller/LibraryCardsController.php b/module/VuFind/src/VuFind/Controller/LibraryCardsController.php index a1ba8dc5556..a9d8b4cd637 100644 --- a/module/VuFind/src/VuFind/Controller/LibraryCardsController.php +++ b/module/VuFind/src/VuFind/Controller/LibraryCardsController.php @@ -100,7 +100,7 @@ public function editCardAction() $card = $user->getLibraryCard($id == 'NEW' ? null : $id); $target = null; - $username = $card->cat_username; + $username = $card->getCatUsername(); $loginSettings = $this->getILSLoginSettings(); // Split target and username if multiple login targets are available: @@ -108,7 +108,7 @@ public function editCardAction() [$target, $username] = explode('.', $username, 2); } - $cardName = $this->params()->fromPost('card_name', $card->card_name); + $cardName = $this->params()->fromPost('card_name', $card->getCardName()); $username = $this->params()->fromPost('username', $username); $target = $this->params()->fromPost('target', $target); @@ -203,7 +203,7 @@ public function selectCardAction() try { $catalog = $this->getILS(); $patron = $catalog->patronLogin( - $user->cat_username, + $user->getCatUsername(), $this->getILSAuthenticator()->getCatPasswordForUser($user) ); if (!$patron) { @@ -290,7 +290,7 @@ protected function processEditLibraryCard($user) // Check the credentials if the username is changed or a new password is // entered: $card = $user->getLibraryCard($id == 'NEW' ? null : $id); - if ($card->cat_username !== $username || trim($password)) { + if ($card->getCatUsername() !== $username || trim($password)) { // Connect to the ILS and check that the credentials are correct: $loginMethod = $this->getILSLoginMethod($target); if (