Skip to content
Snippets Groups Projects
Commit 12a4eb3a authored by André Lahmann's avatar André Lahmann
Browse files

refs #8580:

* use ILS patron data in pda email template (was db user data)
parent 951d6f90
No related merge requests found
......@@ -89,15 +89,20 @@ trait PdaTrait
// User is authorized to use PDA
// Start collecting params for PDA
$catalog = $this->getILS();
$profile = $catalog->getMyProfile($patron);
// prefer profile data from ILS over user data from db
$params = [
'username' => trim($user->cat_username),
'email' => trim($user->email),
'firstname' => trim($user->firstname),
'lastname' => trim($user->lastname)
'email' => isset($profile['email'])
? $profile['email'] : trim($user->email),
'firstname' => isset($profile['firstname'])
? $profile['firstname'] : trim($user->firstname),
'lastname' => isset($profile['lastname'])
? $profile['lastname'] : trim($user->lastname)
];
$catalog = $this->getILS();
$profile = $catalog->getMyProfile($patron);
if (isset($profile['group'])) {
$params['group'] = $profile['group'];
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment