[open-ils-commits] r11855 - trunk/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 15 16:53:26 EST 2009
Author: erickson
Date: 2009-01-15 16:53:22 -0500 (Thu, 15 Jan 2009)
New Revision: 11855
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
added org settings for deleting addrs, cards, and deactivating cards at user merge
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-01-15 21:46:40 UTC (rev 11854)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-01-15 21:53:22 UTC (rev 11855)
@@ -3110,6 +3110,13 @@
return $e->die_event unless $e->checkauth;
my $master_user = $e->retrieve_actor_user($master_id) or return $e->die_event;
+ my $del_addrs = ($U->ou_ancestor_setting_value(
+ $master_user->home_ou, 'circ.user_merge.delete_addresses', $e)) ? 't' : 'f';
+ my $del_cards = ($U->ou_ancestor_setting_value(
+ $master_user->home_ou, 'circ.user_merge.delete_cards', $e)) ? 't' : 'f';
+ my $deactivate_cards = ($U->ou_ancestor_setting_value(
+ $master_user->home_ou, 'circ.user_merge.deactivate_cards', $e)) ? 't' : 'f';
+
for my $src_id (@$user_ids) {
my $src_user = $e->retrieve_actor_user($src_id) or return $e->die_event;
@@ -3119,7 +3126,14 @@
}
return $e->die_event unless
- $e->json_query({from => ['actor.usr_merge', $src_id, $master_id]});
+ $e->json_query({from => [
+ 'actor.usr_merge',
+ $src_id,
+ $master_id,
+ $del_addrs,
+ $del_cards,
+ $deactivate_cards
+ ]});
}
$e->commit;
More information about the open-ils-commits
mailing list