diff --git a/module/finc/src/finc/Controller/PdaTrait.php b/module/finc/src/finc/Controller/PdaTrait.php index 436d954bf4ed2f83aa83c566342bc88ecd12545f..61fc4085dfa1d55ed00cde3e37ab43971fabb16e 100644 --- a/module/finc/src/finc/Controller/PdaTrait.php +++ b/module/finc/src/finc/Controller/PdaTrait.php @@ -62,6 +62,11 @@ trait PdaTrait */ public function pdaAction() { + // Stop now if the user does not have valid catalog credentials available: + if (!is_array($patron = $this->catalogLogin())) { + return $patron; + } + // Check with the set accessPermission if the user is authorized to use PDA $accessPermission = 'access.PDAForm'; @@ -91,6 +96,12 @@ trait PdaTrait 'lastname' => trim($user->lastname) ]; + $catalog = $this->getILS(); + $profile = $catalog->getMyProfile($patron); + if (isset($profile['group'])) { + $params['group'] = $profile['group']; + } + // Create view $view = $this->createPDAEmailViewModel(); diff --git a/themes/finc/templates/Email/acquisitionpda-html.phtml b/themes/finc/templates/Email/acquisitionpda-html.phtml index 6ad536d778b198f28b22282db5df421a3594819c..9ee2862a2498344421bd9c30ccb61fdcd783bd3f 100644 --- a/themes/finc/templates/Email/acquisitionpda-html.phtml +++ b/themes/finc/templates/Email/acquisitionpda-html.phtml @@ -12,6 +12,7 @@ Name: <strong><?= $lastname ?>, <?= $firstname ?></strong><br/> Lesekarte-Nr.: <strong><?= $username ?></strong><br/> Email: <a href="mailto:<?= $email ?>"><?= $email ?></a><br/> + <?=isset($group) ? "Benutzergruppe: ". $group . "<br/>" : ""?> <br/> <? if ($statement): ?> Begründung des Benutzers: diff --git a/themes/finc/templates/Email/acquisitionpda-plain.phtml b/themes/finc/templates/Email/acquisitionpda-plain.phtml index 9c4dbebda46465fabbe22ad07e7bc51f59cc2994..0fc6999aabcb14e807a3e4fc8e8f6e0a14523752 100644 --- a/themes/finc/templates/Email/acquisitionpda-plain.phtml +++ b/themes/finc/templates/Email/acquisitionpda-plain.phtml @@ -6,6 +6,8 @@ Lesekarte-Nr.: <?= $username ?> Email: <?= $email ?> +<?=isset($group) ? "Benutzergruppe: ". $group : ""?> + hat folgenden Titel bestellt: <?= $title ?>