MDL-75010 core: Prevent user last access update on user key login
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user