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:
Dan Poltawski
2012-09-07 10:25:59 +08:00
parent 555112a5ca
commit 879c7655f2
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -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;
}