I am using following code to render node comment form in a block:
$comment_form = drupal_get_form('comment_node_<node_type>_form', (object) array('nid' => $nid)); print drupal_render($comment_form);
It is working fine.
Now I need to check if a user has already commented on the node. If the user has not commented than I will show him/her this comment add form.
But in case, the user has already placed a comment for the node, I want to show him/her the edit form for his/her comment, where he/she can make changes and save thus updating the existing comment instead of saving new.