Using the alert handler...

  • Thread starter Thread starter Lee
  • Start date Start date

Lee

Guest
Member
I have setup the following content type for the alert handler class:

1641423288110.png

I then have this protected php function:

PHP:

Code:
    protected function sendAlert($alertType, $to, $fromUser)
    {
        /* Load the Alert Repo */
        $alertRepo = $this->repository('XF:UserAlert');

        $alertRepo->alert(
            $to,
            $fromUser->user_id,
            $fromUser->username,
            'tls_thoughts',
            '',
            $alertType,
            []...

Read more
 
Top