MDL-35257 lib: if $CFG->logguests is disabled, avoid some log actions
This is for performance, else there can be great contention on the guest user record as we've seen on moodle.org.
This commit is contained in:
@@ -1762,6 +1762,11 @@ function user_accesstime_log($courseid=0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isguestuser()) {
|
||||
// Do not update guest access times/ips for performance.
|
||||
return;
|
||||
}
|
||||
|
||||
if (empty($courseid)) {
|
||||
$courseid = SITEID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user