Index: openacs-4/packages/contacts/tcl/contacts-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs.tcl,v diff -u -N -r1.113 -r1.114 --- openacs-4/packages/contacts/tcl/contacts-procs.tcl 26 Jun 2007 02:53:13 -0000 1.113 +++ openacs-4/packages/contacts/tcl/contacts-procs.tcl 26 Jun 2007 03:52:13 -0000 1.114 @@ -982,14 +982,11 @@ if { $rel_type eq "" || \ (!$no_perm_check_p && $rel_type ne "" && $rel_type ne "membership_rel" && \ ![permission::permission_p -object_id $group_id -privilege "admin"]) } { - switch [contact::type -party_id $party_id] { + switch [contact::type -party_id $user_id] { person - user { set rel_type "membership_rel" } organization { - # Execute the callback for the organization depending on the group they are added to. - # We use this callback to add the organization to .LRN if it is a Customer - callback contact::organization_new_group -organization_id $party_id -group_id $group_id set rel_type "organization_rel" } } @@ -1054,7 +1051,7 @@ } relation_add -member_state $member_state $rel_type $group_id $user_id } - flush_members_cache -group_id $group_id + group::flush_members_cache -group_id $group_id }