mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-38289 condition: Do not fetch profile fields when not logged in
This commit is contained in:
parent
9fbf1dfb6e
commit
b31bd82d60
@ -1324,7 +1324,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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user