mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 05:33:36 +09:00
Fix user profile URL logic for comment authors
Previously, the profile URL was returned even when the user ID was empty. This change ensures the URL is only generated if the user ID is present, preventing potential errors.
This commit is contained in:
@@ -94,7 +94,7 @@ if ( ! class_exists( 'um\frontend\User_Profile' ) ) {
|
||||
* @return string The user profile URL for the comment author.
|
||||
*/
|
||||
public function change_comment_author_url( $comment_author_url, $comment_id, $comment ) {
|
||||
if ( ! is_null( $comment ) ) {
|
||||
if ( ! is_null( $comment ) && ! empty( $comment->user_id ) ) {
|
||||
return um_user_profile_url( $comment->user_id );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user