/**
  * Process an array of users linked to in a comment into a list of users
  * who should actually be notified.
  *
  * Removes duplicates, anonymous users, self-mentions, and mentions of the
  * owner of the talk page
  * @param  User[] $mentions Array of User objects
  * @param  PostRevision $post The Post that is being examined.
  * @param  \Title $title The Title of the page that the comment is made on.
  * @return array Array of user IDs
  */
 protected function filterMentionedUsers($mentions, PostRevision $post, $title)
 {
     $outputMentions = array();
     global $wgFlowMaxMentionCount;
     foreach ($mentions as $mentionedUser) {
         // Don't notify anonymous users
         if ($mentionedUser->isAnon()) {
             continue;
         }
         // Don't notify the user who made the post
         if ($mentionedUser->getId() == $post->getUserId()) {
             continue;
         }
         if (count($outputMentions) > $wgFlowMaxMentionCount) {
             break;
         }
         $outputMentions[$mentionedUser->getId()] = $mentionedUser->getId();
     }
     return $outputMentions;
 }