From 9da4c80b0149a88c14316099515ede2ebdaf7646 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 21 May 2014 14:18:14 +0000 Subject: [PATCH] BUG 12304: LDAP auto-provisioning set default messaging preferences LDAP auto-provisioning should set default messaging preferences upon creation of a user. Signed-off-by: Ulrich Kleiber Manually applied to 3.12.9 and it works beautifully in test and production. Signed-off-by: Chris Cormack Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- C4/Auth_with_ldap.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index 3b40015343..6000e76851 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -26,6 +26,7 @@ use C4::Context; use C4::Members qw(AddMember changepassword); use C4::Members::Attributes; use C4::Members::AttributeTypes; +use C4::Members::Messaging; use C4::Auth qw(checkpw_internal); use Koha::AuthUtils qw(hash_password); use List::MoreUtils qw( any ); @@ -188,6 +189,7 @@ sub checkpw_ldap { } } elsif ($config{replicate}) { # A2, C2 $borrowernumber = AddMember(%borrower) or die "AddMember failed"; + C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $borrowernumber, categorycode => $borrower{'categorycode'} } ); } else { return 0; # B2, D2 } -- 2.39.5