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 269c884 commit 35888eee0d0ff137adda3739d8c8c5542beacf31 @andyjdavis andyjdavis committed Dec 23, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 mod/forum/unsubscribeall.php
View
4 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 35888ee

Please sign in to comment.