Index: openacs-4/packages/dotlrn/www/member-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add-2.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn/www/member-add-2.tcl 23 Oct 2002 12:38:39 -0000 1.10 +++ openacs-4/packages/dotlrn/www/member-add-2.tcl 4 Dec 2002 09:51:04 -0000 1.11 @@ -41,6 +41,18 @@ where user_id = :user_id } +set community_name [dotlrn_community::get_community_name $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} { + set existing_role [dotlrn_community::get_role_pretty_name -community_id $community_id -rel_type [db_string select_role {}]] + if {[empty_string_p $existing_role]} { + set existing_role "member" + } +} + # Depending on the community_type, we have allowable rel_types set rel_types [dotlrn_community::get_roles -community_id $community_id]