//TODO: this function is very slow and inefficient, it would be a major bottleneck in cron processing, this has to be improved in 2.0
// probably we could add two parameters with user messaging preferences and we could somehow preload/cache them in cron
- //TODO: we need to solve problems with database transactions here somehow
+
+ //TODO: we need to solve problems with database transactions here somehow, for now we just prevent transactions - sorry
+ $DB->transactions_forbidden();
if (isset($CFG->block_online_users_timetosee)) {
$timetoshowusers = $CFG->block_online_users_timetosee * 60;