Fixed minor userpage issue where comments posted by guests under the same name as the username being displayed were shown on that user's userpage
authorDan
Fri, 06 Jul 2007 10:59:46 -0400
changeset 46 6ddaa9bd7977
parent 45 9cb99e37bfc4
child 47 d6361ccbd2bd
Fixed minor userpage issue where comments posted by guests under the same name as the username being displayed were shown on that user's userpage
includes/pageprocess.php
--- a/includes/pageprocess.php	Thu Jul 05 10:52:37 2007 -0400
+++ b/includes/pageprocess.php	Fri Jul 06 10:59:46 2007 -0400
@@ -525,7 +525,7 @@
                            LEFT JOIN '.table_prefix.'users_extra AS x
                              ON ( u.user_id = x.user_id OR x.user_id IS NULL ) 
                            LEFT JOIN '.table_prefix.'comments AS c
-                             ON ( ( c.user_id=u.user_id AND c.approved=1 ) OR ( c.comment_id IS NULL AND c.approved IS NULL ) )
+                             ON ( ( c.user_id=authoritative_uid AND c.approved=1 ) OR ( c.comment_id IS NULL AND c.approved IS NULL ) )
                            WHERE u.username=\'' . $db->escape($target_username) . '\'
                            GROUP BY u.user_id;');
     if ( !$q )