'Unsubscribe from all forums' doesn't work - with solution

'Unsubscribe from all forums' doesn't work - with solution

by Catherine Berry -
Number of replies: 0

We are using Moodle 2.4. We have found that if users click the 'Unsubscribe from all forums' link on forum emails without being logged in, they get an 'Invalid user' error message.

I have solved this problem by a small change to mod/forum/unsubscribeall.php. I moved the line $PAGE->set_context(context_user::instance($USER->id)); (line 30) to come after require_login(null, false);

Just posting this in case anyone else has the same problem - I couldn't find any mention of it anywhere. Not sure if the problem still exists in later versions or if it needs to go in the tracker?

Average of ratings: -