Index: openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl,v diff -u -r1.57 -r1.58 --- openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 24 Jul 2004 08:34:10 -0000 1.57 +++ openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 13 Jan 2005 13:57:20 -0000 1.58 @@ -158,6 +158,9 @@ $user_id } } + + # always flush when creating a new user + util_memoize_flush "dotlrn::get_portal_id_not_cached -user_id $user_id" return $rel_id } @@ -191,11 +194,26 @@ } { Remove the user from ACS as well } { - if {[user_p -user_id $user_id]} { - user_remove -user_id $user_id + # DEDS: for now let us not remove users with historical data. + # we assume this by looking at last_visit which is lame but + # the safest for now. the consortium might want to decide on + # whether we also want nuking of users with data present + set last_visit [acs_user::get_element -user_id $user_id -element last_visit] + if {[empty_string_p $last_visit]} { + if {[user_p -user_id $user_id]} { + user_remove -user_id $user_id + } + + # cycle through the applets and invoke their RemoveUser procs + foreach applet_key [dotlrn_applet::list_mounted_applets] { + dotlrn_community::applet_call \ + $applet_key \ + RemoveUser \ + [list $user_id] + } + + acs_user::delete -user_id $user_id -permanent } - - acs_user::delete -user_id $user_id } ad_proc -public remove_users_completely {