[open-ils-commits] r12946 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 21 13:13:11 EDT 2009
Author: erickson
Date: 2009-04-21 13:13:03 -0400 (Tue, 21 Apr 2009)
New Revision: 12946
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Log:
plugged in au.create and au.update hook event creation
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-04-21 16:24:52 UTC (rev 12945)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-04-21 17:13:03 UTC (rev 12946)
@@ -318,10 +318,12 @@
$logger->activity("user ".$user_obj->id." updating/creating user ".$new_patron->id);
- my $opatron;
- if(!$patron->isnew) {
- $opatron = new_editor()->retrieve_actor_user($new_patron->id);
- }
+ my $tses = OpenSRF::AppSession->create('open-ils.trigger');
+ if($patron->isnew) {
+ $tses->request('open-ils.trigger.event.autocreate', 'au.create', $new_patron, $new_patron->home_ou);
+ } else {
+ $tses->request('open-ils.trigger.event.autocreate', 'au.update', $new_patron, $new_patron->home_ou);
+ }
$apputils->commit_db_session($session);
More information about the open-ils-commits
mailing list