From ac9d18dfa4eecf115b8f4418fee07621f3f1e0c5 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Mon, 6 May 2013 17:18:15 +0800 Subject: [PATCH] MDL-38289 condition: Do not fetch profile fields when not logged in --- lib/conditionlib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/conditionlib.php b/lib/conditionlib.php index 9d74cbd2944..8b423f633f4 100644 --- a/lib/conditionlib.php +++ b/lib/conditionlib.php @@ -1279,7 +1279,7 @@ abstract class condition_info_base { } $iscurrentuser = $USER->id == $userid; - if (isguestuser($userid)) { + if (isguestuser($userid) || ($iscurrentuser && !isloggedin())) { // Must be logged in and can't be the guest. (this should never happen anyway) return false; }