How to send review comments to the author by the editor

Hello, I used the ojs2.4.8, I want to send the review comments to the author by the editor-in-chief, but there isn’t any ideas. then I found these codes, is it useful for me? Could you help me for it?

function postPeerReviewComment($args, &$request) {
$articleId = (int) $request->getUserVar(‘articleId’);
$reviewId = (int) $request->getUserVar(‘reviewId’);

  // If the user pressed the "Save and email" button, then email the comment.
  $emailComment = $request->getUserVar('saveAndEmail') != null ? true : false;

  $this->validate($request, $reviewId);

  if (ReviewerAction::postPeerReviewComment($this->user, $this->submission, $reviewId, $emailComment, $request)) {
  	ReviewerAction::viewPeerReviewComments($this->user, $this->submission, $reviewId);


function postPeerReviewComment(&$user, &$article, $reviewId, $emailComment, $request) {
if (!HookRegistry::call(‘ReviewerAction::postPeerReviewComment’, array(&$user, &$article, &$reviewId, &$emailComment))) {

  	$commentForm = new PeerReviewCommentForm($article, $reviewId, ROLE_ID_REVIEWER);

  	if ($commentForm->validate()) {

  		// Send a notification to associated users
  		$notificationManager = new NotificationManager();
  		$notificationUsers = $article->getAssociatedUserIds(false, false);
  		foreach ($notificationUsers as $userRole) {
  				$request, $userRole['id'], NOTIFICATION_TYPE_REVIEWER_COMMENT,
  				$article->getJournalId(), ASSOC_TYPE_ARTICLE, $article->getId()

  		if ($emailComment) {

  	} else {
  		return false;
  	return true;


I solved this problem, just click the " import peer review " button.