MDL-75010 core: Prevent user last access update on user key login

This commit is contained in:
Dan Marsden
2022-10-31 14:19:31 +13:00
parent 141e369a01
commit 2c99c5fa4d
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -1592,6 +1592,11 @@ function user_accesstime_log($courseid=0) {
return;
}
if (defined('USER_KEY_LOGIN') && USER_KEY_LOGIN === true) {
// Do not update user login time when using user key login.
return;
}
if (empty($courseid)) {
$courseid = SITEID;
}
+5
View File
@@ -3394,6 +3394,11 @@ function update_user_login_times() {
return true;
}
if (defined('USER_KEY_LOGIN') && USER_KEY_LOGIN === true) {
// Do not update user login time when using user key login.
return true;
}
$now = time();
$user = new stdClass();