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:
@@ -3201,6 +3201,11 @@ function get_user_key($script, $userid, $instance=null, $iprestriction=null, $va
|
||||
function update_user_login_times() {
|
||||
global $USER, $DB;
|
||||
|
||||
if (isguestuser()) {
|
||||
// Do not update guest access times/ips for performance.
|
||||
return true;
|
||||
}
|
||||
|
||||
$now = time();
|
||||
|
||||
$user = new stdClass();
|
||||
|
||||
Reference in New Issue
Block a user