Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 118066c

Browse files
committed
fix login bug
https://wordpress.org/support/topic/false-error-please-fill-the-required -fields-name-email-commenting?replies=5
1 parent ad28e76 commit 118066c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

comments.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function openid_process_comment( $comment ) {
8686

8787
// duplicate name and email check from wp-comments-post.php
8888
if ( $comment['comment_type'] == '') {
89-
openid_require_name_email();
89+
openid_require_name_email( $comment );
9090
}
9191

9292
return $comment;
@@ -97,9 +97,10 @@ function openid_process_comment( $comment ) {
9797
* Duplicated code from wp-comments-post.php to check for presence of comment author name and email
9898
* address.
9999
*/
100-
function openid_require_name_email() {
100+
function openid_require_name_email( $comment ) {
101101
$user = wp_get_current_user();
102-
global $comment_author, $comment_author_email;
102+
$comment_author = $comment['comment_author'];
103+
$comment_author_email = $comment['comment_author_email'];
103104

104105
if ( get_option('require_name_email') && !$user->ID ) {
105106
if ( 6 > strlen($comment_author_email) || '' == $comment_author ) {

0 commit comments

Comments
 (0)