MDL-65655 forum: Do not send notifications to inactive users
commite31f62a788121279ae3dec57830b0983ac9c6385
authorDavid Mudrák <david@moodle.com>
Mon, 20 May 2019 16:39:13 +0000 (20 18:39 +0200)
committerDavid Mudrák <david@moodle.com>
Mon, 20 May 2019 16:46:35 +0000 (20 18:46 +0200)
treeca2ad0404a79a6047a4dc15a644cbf1243f66009
parent89457b26d192c06325bb6782b85d1025dafbefe9
MDL-65655 forum: Do not send notifications to inactive users

We cannot deliver notifications to users who had subscribed to a forum
or discussion and were later inactivated either by suspending or setting
the auth method to nologin. The deliver adhoc task cannot be run as
these users, throwing the "Suspended account" exception.

The solution is to make sure that fetch_subscribed_users() does not
include those inactive users.
mod/forum/classes/subscriptions.php
mod/forum/tests/mail_test.php