Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
comment_form_submit() calls user_access('post comments'), and if denied, will not save the comment.
This makes the comment_form impossible to submit via drupal_form_execute(). At least, without playing complex and potentially dangerous tricks with the global user.
The comment form is not displayed unless the user has permission. Why check again?
Comments
Comment #1
agentrickard#687584: Remove access checks from comment_form_submit()