Bug 6022: Auth_with_ldap check if categorycode is valid
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 31 Mar 2011 13:14:46 +0000 (15:14 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 6 Dec 2011 18:51:15 +0000 (19:51 +0100)
commit0352a8f24ac72b7dfbf84ea3c6f11e2e714708b0
tree7ed112774bb265363fd24fb76c038088980080b7
parentaef1dd15fbe37a8a9c30ba4b38f7ecd6c1fea54d
Bug 6022: Auth_with_ldap check if categorycode is valid

When importing users from LDAP, Auth_with_ldap.pm doesn't check if value for
categorycode is present in categories table in Koha resulting in referential
integrity error instead of using default value from koha-conf.xml

Test scenario:
1. enable LDAP in koha-conf.xml using <useldapserver>1</useldapserver>
   and add <ldapserver> configuration with
   <categorycode is="SomeLDAPField">DefaultCategoryCode</categorycode>
2. select/create LDAP user with category in SomeLDAPField which isn't in
   Koha
3. try logging in and ensure that assigned category to new user is
   DefaultCategoryCode

Signed-off-by: Marijana Glavica <mglavica@ffzg.hr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Auth_with_ldap.pm