Index: openacs-4/packages/dotlrn/www/member-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add-3.tcl,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/dotlrn/www/member-add-3.tcl 9 Aug 2002 18:39:26 -0000 1.5 +++ openacs-4/packages/dotlrn/www/member-add-3.tcl 17 Oct 2002 12:52:53 -0000 1.5.2.1 @@ -28,8 +28,16 @@ } set community_id [dotlrn_community::get_community_id] +# See if the user is already in the group +set member_p [dotlrn_community::member_p $community_id $user_id] +if {$member_p} { + dotlrn_community::remove_user $community_id $user_id +} + + # Add the relation dotlrn_community::add_user -rel_type $rel_type $community_id $user_id ad_returnredirect $referer +