Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-37481 user: fixed bug when logged in as guest

  • Loading branch information...
commit c7eea4e585e782f222c810938cfab8cec7f9c006 1 parent 0897b1e
Frédéric Massart FMCorz authored samhemelryk committed

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. +7 1 user/view.php
8 user/view.php
@@ -57,7 +57,13 @@
57 57 }
58 58
59 59 if (!empty($CFG->forceloginforprofiles)) {
60   - require_login(); // we can not log in to course due to the parent hack below
  60 + require_login(); // We can not log in to course due to the parent hack below.
  61 +
  62 + // Guests do not have permissions to view anyone's profile if forceloginforprofiles is set.
  63 + if (isguestuser()) {
  64 + $SESSION->wantsurl = $PAGE->url->out(false);
  65 + redirect(get_login_url());
  66 + }
61 67 }
62 68
63 69 $PAGE->set_context($coursecontext);

0 comments on commit c7eea4e

Please sign in to comment.
Something went wrong with that request. Please try again.