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

This commit is contained in:
Frederic Massart
2013-03-04 11:18:49 +13:00
committed by Sam Hemelryk
parent 8b0318d538
commit fc58c234ed
+7 -1
View File
@@ -57,7 +57,13 @@ if (isguestuser($user)) {
}
if (!empty($CFG->forceloginforprofiles)) {
require_login(); // we can not log in to course due to the parent hack below
require_login(); // We can not log in to course due to the parent hack below.
// Guests do not have permissions to view anyone's profile if forceloginforprofiles is set.
if (isguestuser()) {
$SESSION->wantsurl = $PAGE->url->out(false);
redirect(get_login_url());
}
}
$PAGE->set_context($coursecontext);