https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36503

--- Comment #13 from Raphael Straub <[email protected]> ---
(In reply to David Cook from comment #11)
> Hmm... wouldn't it make more sense to run this plugin just before returning? 
Maybe, but I wanted to use the update on auth parameter of the domain, so I had
to update the mapped data before the call to $patron->set($mapped_data). In
addition, if update on auth is true, the patron is updated in the database
before the hook has the opportunity to choose another patron.

> That way you could also have access to the $domain, and you'd have access to
> the default values coming from the domain in the $mapped_data.
> 
> Otherwise, if you tried to change the categorycode/branchcode based on IdP
> data for a new patron, you wouldn't be able to do it. 
In our use case having access to the domain is not necessary, but calling the
hook before $patron->…->store with the domain as an additional argument could
be a good idea. Then the plugin might modify $domain->update_on_auth,
$domain->default_category_id or $domain->default_library_id.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to