From 6599e2f43b6639698e0eb38e01acd0c73bd27aa2 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 12 Jun 2009 18:12:57 +0000 Subject: [PATCH] disallow merge if subordinate account is in collections git-svn-id: svn://svn.open-ils.org/ILS/trunk@13379 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Actor.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index b8201b1228..5d3107d7ad 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -3053,6 +3053,10 @@ sub merge_users { my $e = new_editor(xact => 1, authtoken => $auth); return $e->die_event unless $e->checkauth; + # disallow the merge if any subordinate accounts are in collections + my $colls = $e->search_money_collections_tracker({usr => $user_ids}, {idlist => 1}); + return OpenILS::Event->new('MERGED_USER_IN_COLLECTIONS', payload => $user_ids) if @$colls; + 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'; -- 2.11.0