mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-45546 mod_forum: Login the user before getting its context
This commit is contained in:
parent
06a689b761
commit
885650c70c
@ -27,10 +27,10 @@ require_once("lib.php");
|
||||
$confirm = optional_param('confirm', false, PARAM_BOOL);
|
||||
|
||||
$PAGE->set_url('/mod/forum/unsubscribeall.php');
|
||||
$PAGE->set_context(context_user::instance($USER->id));
|
||||
|
||||
// Do not autologin guest. Only proper users can have forum subscriptions.
|
||||
require_login(null, false);
|
||||
$PAGE->set_context(context_user::instance($USER->id));
|
||||
|
||||
$return = $CFG->wwwroot.'/';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user