[Koha-devel] Valid id_types for LookupPatron in ilsdi.pl

Jon Knight J.P.Knight at lboro.ac.uk
Wed Nov 8 16:41:21 CET 2017


Hi all,

I've been tinkering on bug 13990 to provide ilsdi.pl with a default when the optional id_type field in LookupPatron isn't supplied by the client.  We'd noticed some time ago that we can use "email" as an id_type to search patron's based on email address, which turns out to be very handy for integrating with the CampusM mobile app that we have here (which uses email addresses for lots of stuff).  However email isn't a documented id_type so whilst tinkering  on 13990 I added it into the POD and online documentation in the patches.

I traced the logic in the code a bit and realised that any borrower table field can be specified as an id_type.  Is this expected/OK? The ilsdi.pl script is usually either disabled or restricted to a known set of IP addresses, so I don't think its much of a security issue, but it does mean that we're exposing database schema details to the outside world, which might cause integration issues if we did ever change the borrower table fields.  Should id_type be a constrained list that LookupPatron validates?  If so, I hope we can have email in there! ;-)  If not, should the documentation point out that any borrower table column name is OK as an id_type field?

Jon


More information about the Koha-devel mailing list