MDL-38289 condition: Do not fetch profile fields when not logged in

This commit is contained in:
Frederic Massart
2013-05-07 10:19:27 +08:00
parent 56463941a8
commit ac9d18dfa4
+1 -1
View File
@@ -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;
}