LPH
Well-known member
Currently, this code works for sending to the individual creating the thread. How can an alert be written so that the alert goes to everyone who belongs to a particular user group?
PHP:
/** @var \XF\Repository\UserAlert $alertRepo */
$alertRepo = \XF::app()->repository('XF:UserAlert');
$alertRepo->alertFromUser($user, $author, 'post', $thread->first_post_id, 'insert');