<?php

/**
 * bp_core_link_comments_with_profiles()
 *
 * Links comments from loggend in users with thier
 * profiles
 * 
 * @package BuddyPress Core
 * @global $comment WordPress comment global for the current comment.
 * @param url Current comment author url
 * @uses bp_core_get_user_domain() BuddyPress function to get the profile url for a user.
 */
function bp_core_link_comments_with_profiles( $url ) {
	global $comment;
	
	if( $comment->user_id != '0' )
		$url = bp_core_get_user_domain( $comment->user_id );
	
	return apply_filters( 'bp_core_link_comments_with_profiles', $url );
}

add_filter( 'get_comment_author_url', 'bp_core_link_comments_with_profiles' );

?>