You can simplly check
if ($comment->user_id > 0){
//comment by registered user
}else{
//comment by none registered user
}
Related Posts:
- Commenting in user profile page?
- What should I do to make generated avatars different for anonymous comments?
- Show content only if member left a comment
- How to display random users with avatars
- Post comment as different user than logged in
- Wrong gravatar showing up?
- Get most active users sort by comment count
- WordPress comments email notification for authors
- remove_filter( ‘comment_author’, ‘floated_admin_avatar’ ); doesn’t work
- Replace comment avatars and links at the same time
- List User Comments on User Profile BuddyPress [closed]
- Hold comments for moderation only if user is not logged in
- Display WordPress commenter nice name
- Cannot get local avatars to show [closed]
- Check if someone recently commented in one of my posts
- Highlighting the current users comment
- Display the number of unseen comments on a page since the user last visit
- How to display html in only the first level of WP comments?
- How to change avatar of the comment author using comment ID?
- woocommerce allow users to select or use avatar
- Comment Form – E-mail Not Required!
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- Allow the comment author to delete their own comments
- All users/comments suspected as bot? [closed]
- Commenting in user profile page?
- if user role is then echo text
- Remove the deleted user comment
- Anonymize comments after one year
- How can I get list of emails of users who commented on a post?
- Why could my comment_form variable not be working?
- Custom comment field not showing when logged-in
- get_comment_author_link not working properly
- Problem in getting user comments permalinks
- Upload avatar for post comment
- WordPress Custom Local Avatar not showing in comments
- wp list all users who haven’t commented on a post
- I want to limit registered user to 1 comment per post in WordPress
- Let user delete comment on front end only
- WordPress shows admin’s avatar after editing a comment
- selectively disable akismet
- How to display comments by logged in user and responses?
- Deleting users do not deletes coments
- delete user not working
- If paginated comments don’t span to a second page, how do I hide the div wrapper?
- How can I filter the user avatar displayed in comments? – get_avatar_url filter works everywhere but not in comments
- How do I comment out a block of tags in XML?
- R: Comment out block of code
- Why do I get comment spam even with Akismet and Captcha?
- What tools are available for managing/writing to WordPress? [closed]
- How to rearrange fields in comment_form()
- setting comments off as default for pages and custom post types?
- Adding fields to the “Add New User” screen in the dashboard
- Is it possible to pull comments from facebook into your blog?
- How to check if a user exists by a given id
- Is there a is_user_logged_in() for multisite?
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- How to export comments in WordPress?
- Non-threaded comment replies with link to original comment
- Approve comment hook?
- How to change “You must be logged in to post a comment.”
- comment_post_ID 0 (cannot remove from dashboard)
- Disable comments on all posts/pages
- How do I delete all comments from a specific old blog post?
- Removing the “Website” Field from Comments and Replies?
- Stop WordPress redirecting comment-page-1 to the post page?
- Use author author display name in permalink structure for pages and posts
- Importing old Disqus comments into WordPress
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- How to enable comments for pending and draft posts?
- Using WordPress’ WYSIWYG for comments
- Enable Submit Comment Without Page Reload (Using Ajax)?
- What for is the table “wp_commentmeta” exactly?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Add option to disable comments on a per posts basis?
- Resetting comment count
- When importing – failed to import: Invalid post type feedback
- How to change the email notification recipient (user) for new comments?
- How to limit users to one comment per post
- Redirect user to a custom url after submitting the comment
- Paginate result set from $wpdb->get_results()
- Change Comment Author Display Name
- Would switching to InnoDB from MyISAM improve performance of comments table?
- Custom comment type based on thread level
- Get a list of all available fields in the User Profile
- How to add internal, revision comments to page updates
- How to load and show comments with AJAX instead of pagination?
- How to change user`s avatar?
- Linking to Page Showing Only Comments Without Parent Post
- Comment Reply javascript
- How do we remove the H3 tag for the reply-title I.D
- Comments not appearing at all
- comments reply script not working
- How to display comment form error messages in the same page
- 3 moderators to approve comment
- Logout redirect to current page – function
- How to paginate the get_users function?
- How to deal with small scale comment spam on small commercial sites? [closed]
- Remove Comments Metabox but still allow comments
- A plugin where users can comment with Facebook or Twitter or OpenID [closed]