Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v
diff -u -r1.50 -r1.51
--- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl	5 Feb 2007 07:05:44 -0000	1.50
+++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl	17 Aug 2007 14:03:44 -0000	1.51
@@ -233,7 +233,7 @@
     } else {
 	# As the old functionality returned an error, but I want an empty string for e-mail
 	# Therefore for emails we use db_string
-	set person_name [db_string get_person_name {} -default ""]
+	set person_name [db_string get_party_name {} -default ""]
     }
     return $person_name
 }
Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.xql,v
diff -u -r1.18 -r1.19
--- openacs-4/packages/acs-tcl/tcl/community-core-procs.xql	5 Feb 2007 07:05:44 -0000	1.18
+++ openacs-4/packages/acs-tcl/tcl/community-core-procs.xql	17 Aug 2007 14:03:45 -0000	1.19
@@ -70,9 +70,20 @@
       <querytext>
       
           select distinct first_names||' '||last_name as person_name
+            from persons
+           where person_id = :person_id
+          
+      </querytext>
+</fullquery>
+
+<fullquery name="person::name_not_cached.get_party_name">      
+      <querytext>
+      
+          select distinct first_names||' '||last_name as person_name
             from persons, parties
-           where person_id = party_id
-		and (party_id = :person_id or email = :email)
+           where person_id = party_id 
+             and email = :email
+             
           
       </querytext>
 </fullquery>