Permalink
Browse files

MDL-30722 mod_forum: prevented users being auto-logged in as guest wh…

…en they access /mod/forum/unsubscribeall.php
  • Loading branch information...
1 parent 1aff7bb commit 9e74931f1a64c14d532e31015271ac3c414ac3a6 @andyjdavis andyjdavis committed Jan 23, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/forum/unsubscribeall.php
@@ -27,8 +27,10 @@
$confirm = optional_param('confirm', false, PARAM_BOOL);
$PAGE->set_url('/mod/forum/unsubscribeall.php');
+$PAGE->set_context(get_context_instance(CONTEXT_USER, $USER->id));
-require_login();
+// Do not autologin guest. Only proper users can have forum subscriptions.
+require_login(null, false);
$return = $CFG->wwwroot.'/';

0 comments on commit 9e74931

Please sign in to comment.