check if a comment was made by a registered user
$comment = get_comment( $CommentID ); $commentatorID = $comment->user_id; if ($commentatorID > 0 ) { //Comment made by registered user, do stuff } From the codex get_comment(), about the return value of user_id: user_id (integer) The comment author’s ID if he is registered (0 otherwise)