The problem that I have with this code is that is assumes that you want to use that info for your comments…
I’ve changed lines 22-30 from:
get_currentuserinfo();
if ( $user_ID ) :
$comment_author = $user_login;
$comment_author_email = $user_email;
$comment_author_url = str_replace("https://", "", $user_url);
else :
if ( get_option("comment_registration") )
die( __("Sorry, you must be logged in to post a comment.") );
endif;
To:
get_currentuserinfo();
if ( get_option('comment_registration') && $user_ID ) :
$comment_author = $user_identity;
$comment_author_email = $user_email;
$comment_author_url = str_replace('https://', '', $user_url);
elseif ( get_option('comment_registration') && !$user_ID) :
die( __('Sorry, you must be logged in to post a comment.') );
endif;
So it first check to see if comment registration is on and then, if it is on, to try and get the user information. If comment registration is off, then just use the cookie/input info…
Good idea/Bad idea?????