An email thread got going on the OCT list about handling .LRN-specific changes in the ACS core. Jeff suggested we move it here, so I'm posting.
Here's a piece of code from SloanSpace that motivated the discussion
diff -r 463-final/packages/acs-admin/www/users/member-state-change.tcl ssv2-current/packages/acs-admin/www/users/member-state-change.tcl
I can't remember if I made this change or someone else, but I think what's going on is that we needed to remove community memberships and notifications for any user whose membership was no longer valid. Reasonable enough. The problem is, acs shouldn't have to know about .LRN and any other extensions that need to know when a member's state changes. In this particular case, I suspect that the right solution is to implement a callback mechanism using service contracts. Here's how it would work. Upon changing a member's state, the code would invoke the RemoveUser operation in all implementors of particular service contract. There are examples of this in the .LRN codebase. One example is the RemoveUser operation in the dotlrn_applet service contract.45a46,47 > notification::request::delete_all_for_user -user_id $user_id > > dotlrn_community::remove_user_from_all -user_id $user_id 53a56,57 > notification::request::delete_all_for_user -user_id $user_id > > dotlrn_community::remove_user_from_all -user_id $user_id
Request notifications