There are a number of functions you can use:
The first function being the most simple to use and the last function gives you many more options – it depends what you want to do.
You can create the new account when the comment is posted using the comment_post hook. You will first want to get the comment using get_comment()
, passing the ID from the comment_post
hook, and check to see if the email is already registered on your site,
Just make it very clear to the user that you are creating an account, as per Tom’s comment on your question.
Related Posts:
- How to change “You must be logged in to post a comment.”
- What should I do to make generated avatars different for anonymous comments?
- Display commenter’s registration date on comments?
- Send Notifications to All Admins
- Registered but Anonymous comments
- How can I test why the comment hook is not working?
- How can I convert anonymous commenters into registered users?
- How to retain comment text on comment form after login/registration?
- All users/comments suspected as bot? [closed]
- How to replace anonymous comment form with a registration form on wordpress?
- Change hyperlink to User Registration page instead of WordPress login page
- How do I convert users who put an email and username for a comment into registered users? [duplicate]
- How to rearrange fields in comment_form()
- Commenting in user profile page?
- How do I delete all comments from a specific old blog post?
- Removing the “Website” Field from Comments and Replies?
- How to load and show comments with AJAX instead of pagination?
- Reverse comment pagination numbers
- get recent comments of a particular category
- Hook/Filter before and after comments
- Comment form validation
- WP_Comment_Query() displays “password protected” comments?
- Is it possible to move a comment that should be a reply to another comment?
- Can I seperate comments from post?
- I have tried using Plugins to remove 72K comments with no success
- Making a Comment on a page without being on that page?
- How do I display the commentor’s first name and last name in the comments?
- show un-approved comments at wordpress front end
- What is the server IP comment hack
- How to add consent checkbox in comment section
- How to add pagination to comments?
- Do I have to have a nonce for a custom comment field?
- Get last seen date/time in wordpress get_comments() [closed]
- WP 4.4.1 allow empty comments via add_action ‘pre_comment_on_post’
- How to get replies of a comment?
- Share comment to twitter after publishing [closed]
- changing comment-page-# to something like review-page-#
- show if comment is in moderation
- Deleting the attached “comment replies” when trashing a comment
- How can I get a list of comments by target
- Load comments.php template outside the post loop
- Are there any “YouTube-styled” commenting systems for WordPress?
- How to auto empty comment trash after X days
- Add filter to comments loop?
- Show comments to unregistered users
- Control panel loads slowly due to 2 slow queries on comment table
- Display complete comment section via post ID
- Comment Pagination Behavior wp_list_comments() – comment ordering and pagination
- Adding character count and limit in comments, modifying labels and fields – jetpack
- Check if comment was successfully submited
- After Submitting Comment Form Shows an Empy Page in WordPress
- Unique User for all visitor, but possibility to comment with unique name
- comments_array filter doesn’t work in some themes
- Change id=”respond” to the comments container
- Comments on Author page
- Link to a User’s Forum Profile From Their Comment
- if user role is then echo text
- strange behavior with comment position
- Safely editing core files
- Woocommerce comments subscription [closed]
- Way to count the number of people who have commented on a post?
- Batch approve comments
- Disable comments and pingbacks on old custom post types
- Add paragraph tags to comments
- How to tweak comment fields properly from functions.php
- How to allow duplicate comments?
- Advanced Custom Fields comments [closed]
- How to wrap comment_form $fields in one div?
- Two textareas showing up in comments.php
- WordPress comments – delimiter “/” not found
- how should the comment form really work?
- Give subscribers the option to post anonymously
- create separate page template for wordpress comments
- Styling Admin comments in WP 3.1.3
- Displaying comment counts in WP Gallery thumbnail view
- How to rename/change the comment labels in WordPress backend?
- How to display replies to his comments in user profile of current user
- Top rated posts Average rating issue
- Disallow Comments
- stop url changing when user comments
- Keep comment author’s name on their comment even when their account is deleted
- How to add a class to comment submit button?
- WordPress Commenting System User access and Security
- Comments.php is not getting called on main blog page
- Allowing comments on author pages
- Comment section not appearing on posts
- How can I see whether a commenter has subscribed to be notified of replies / other comments to a post
- WordPress Comments – Only show part of user name
- Where is the Leave a Comment link set
- Disable comment moderation in multisite
- Broken comments section – WordPress 2014 Theme
- Auto disable comments with custom field
- I want to fill the comment with the comment count?
- delete user not working
- Replace do_action() with a normal submit form in comments.php
- How to remove or customize “Comment” in comments form?
- Comments on pages not appearing, even though I enabled them
- check if a comment was made by a registered user
- Stop future commenting on specific post
- WordPress Editor widgets “comments” and “post comments form” getting disappeared with elementor [closed]