platform icon indicating copy to clipboard operation
platform copied to clipboard

admin user first login time is always = last login time

Open aeberhart opened this issue 1 year ago • 1 comments

in the on-login expression we run

  $upsert("config", "user", {"ID":email, "name":user, "firstlogin":$now(), "lastlogin":$now()});

both first and last login are set to now

also, there's a table update trigger:

'admin' in $djRoles() ? false :
{
  'setObject': object ~> | $ | {'lastlogin': $now()}, ['firstlogin', 'name'] |
}

that basically disallows non admins to change first and last login

aeberhart avatar Aug 09 '24 11:08 aeberhart

solution would be to move "firstlogin":$now() from on-login to the on-create trigger

aeberhart avatar Aug 12 '24 12:08 aeberhart

not really that important

aeberhart avatar Mar 27 '25 09:03 aeberhart