Missing updates on user last activity when "Automatically deactivate dormant users" is enabled

Summary

When Automatically deactivate dormant users is enabled, operations such as git and api will not trigger updates on user last activity.

Steps to reproduce

  1. use user Administrator to login.
  2. create a project, for example, activity-demo.
  3. clone project to local.
  4. update Administrator's last_activity_on to a non current date.
update users set last_activity_on = now()+interval '-1 d' where id=1;
select id, name, last_activity_on from users where id=1;
  1. execute git pull from local repo.
  2. check last_activity_on.
select id, name, last_activity_on from users where id=1;
  1. enable deactivate dormant users and repeat the above operations.

Example Project

What is the current bug behavior?

Missing update user last activities when turn on Automatically deactivate dormant users.

What is the expected correct behavior?

Update user last activities when turn on Automatically deactivate dormant users.