我想使用用户名和随机生成的密码将所有已发布的匿名评论转换为注册用户。
我真的不知道从哪里开始。
我还想将新的匿名评论者转换为注册用户。如果我在functions.php 使用register_new_user 它会自动为用户生成一个随机密码并通过电子邮件发送给他们,还是我也需要在评论表单下创建一个密码字段?
以下是未注册用户时我的评论表:

下面是我的注释表单代码:
args = array(
\'comment_field\' => \'<div class="form-group the-comment-form"><label for="comment" class="custom-avatar">\' . $useravatar_custom .
\'</label><div id="\' . $textareaId . \'"><textarea id="comment" class="form-control" name="comment" cols="45" rows="8" aria-required="true" placeholder="Join the discussion..."></textarea></div></div>\',
\'fields\' => apply_filters( \'comment_form_default_fields\', array(
\'author\' =>
\'<div class="form-group comments-name">\' .
\'<label for="author">\' . __( \'Username\', \'usertheme\' ) . \'</label> \' .
( $req ? \'<span class="required">*</span>\' : \'\' ) .
\'<input id="author" name="author" class="form-control" type="text" value="\' . esc_attr( $commenter[\'comment_author\'] ) .
\'" size="30"\' . $aria_req . \' /></div>\',
\'email\' =>
\'<div class="form-group comments-email"><label for="email">\' . __( \'Email\', \'usertheme\' ) . \'</label> \' .
( $req ? \'<span class="required">*</span>\' : \'\' ) .
\'<input id="email" name="email" class="form-control" type="text" value="\' . esc_attr( $commenter[\'comment_author_email\'] ) .
\'" size="30"\' . $aria_req . \' /></div>\'
如您所见,需要一个名称和电子邮件。我想做的是让它注册一个新用户。但我还想为用户生成一个随机密码。
我是否需要在评论表单中添加密码字段?或者我需要使用wordpress创建密码功能吗?或者如果我使用register_new_user 它会自动生成一个随机密码并通过电子邮件向用户发送其新的登录详细信息吗?