Index: openacs-4/packages/dotlrn/lib/member-email.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/lib/member-email.tcl,v diff -u -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/dotlrn/lib/member-email.tcl 26 Aug 2005 15:45:39 -0000 1.1.2.7 +++ openacs-4/packages/dotlrn/lib/member-email.tcl 6 Sep 2005 12:30:04 -0000 1.1.2.8 @@ -32,11 +32,19 @@ dotlrn::require_user_admin_community -community_id $community_id } -db_0or1row member_email { - select email_id - from dotlrn_member_emails - where community_id = :community_id - and type = :type +if {[empty_string_p $community_id]} { + db_0or1row member_email { + select email_id from + dotlrn_member_emails + where community_id is null + and type = :type} +} else { + db_0or1row member_email { + select email_id + from dotlrn_member_emails + where community_id = :community_id + and type = :type + } } array set available_vars [lindex [callback dotlrn::member_email_available_vars -type $type] 0]