diff --git a/core/um-filters-commenting.php b/core/um-filters-commenting.php
index 99e5356a..4ea063e5 100644
--- a/core/um-filters-commenting.php
+++ b/core/um-filters-commenting.php
@@ -3,24 +3,30 @@
/***
*** @Control comment author display
***/
- add_filter('get_comment_author_link', 'um_comment_link_to_profile', 10000 );
- function um_comment_link_to_profile( $return ) {
- global $comment, $ultimatemember;
- if ( isset( $comment->user_id ) && !empty( $comment->user_id ) ) {
+ add_filter('get_comment_author_link', 'um_comment_link_to_profile', 10000, 3 );
+ function um_comment_link_to_profile( $return, $author, $comment_ID ) {
+ global $ultimatemember;
+
+ $comment = get_comment( $comment_ID );
- if ( isset( $ultimatemember->user->cached_user[ $comment->user_id ] ) && $ultimatemember->user->cached_user[ $comment->user_id ] ) {
+ if( isset( $comment->user_id ) && ! empty( $comment->user_id ) ){
+ if ( isset( $ultimatemember->user->cached_user[ $comment->user_id ] ) && $ultimatemember->user->cached_user[ $comment->user_id ] ) {
+
+ $return = '' . $ultimatemember->user->cached_user[$comment->user_id]['name'] . '';
- $return = '' . $ultimatemember->user->cached_user[$comment->user_id]['name'] . '';
-
- } else {
+ } else {
+
+ um_fetch_user( $comment->user_id );
- um_fetch_user($comment->user_id);
- $ultimatemember->user->cached_user[ $comment->user_id ] = array('url' => um_user_profile_url(), 'name' => um_user('display_name') );
- $return = '' . $ultimatemember->user->cached_user[$comment->user_id]['name'] . '';
- um_reset_user();
+ $ultimatemember->user->cached_user[ $comment->user_id ] = array('url' => um_user_profile_url(), 'name' => um_user('display_name') );
+ $return = '' . $ultimatemember->user->cached_user[$comment->user_id]['name'] . '';
+
+ um_reset_user();
+ }
}
-
- }
+
return $return;
- }
\ No newline at end of file
+ }
+
+
\ No newline at end of file