# Users.updated\_at not renewed on all updates

**URL:** https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701
**Category:** Development
**Tags:** rest-api
**Created:** [May 7, 2020, 9:54am UTC](https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701 "2020-05-07T09:54:37Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![DDo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ddo/32/142669_2.png) [@DDo](https://meta.discourse.org/u/DDo)
#### Post date: [May 7, 2020, 9:54am UTC](https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701/1 "2020-05-07T09:54:37Z")

</div>

When modifying a user via the api I wanted to use users.updated\_at as criteria for the last update.  
Now I noticed that it is not set anew upon all actions. Eg, when changing watched categories or watch 1st post categories, it is not.

Why not?

I do

- add new users
- put users to groups
- delete users from groups
- set the main group for a user
- alter notification levels
- set/unset a specific category for/from watching or watching 1st post
- change the email address of a user
- suspend/unsuspend users

and believed each of these actions should alter users.updated\_at.  
Is there another field that I’ve missed which can tell me when the settings of a user are last altered?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 7, 2020, 12:00pm UTC](https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701/2 "2020-05-07T12:00:09Z")

</div>

Watched categories are in their own table, so you’d need to check there, I think.

---

<div class="post-metadata">

### Author: ![DDo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ddo/32/142669_2.png) [@DDo](https://meta.discourse.org/u/DDo)
#### Post date: [May 7, 2020, 12:49pm UTC](https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701/3 "2020-05-07T12:49:59Z")

</div>

That would be category\_users and there is no updated\_at. Or is the category itself altered when a user sets it on watched?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 7, 2020, 2:31pm UTC](https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701/4 "2020-05-07T14:31:48Z")

</div>

It looks like you’re right and that there is no `updated_at` for the `category_users` table. I’m not sure how to solve your problem, you could create a user\_custom\_field that you updated via the API, I think.

---

<div class="post-metadata">

### Author: ![DDo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ddo/32/142669_2.png) [@DDo](https://meta.discourse.org/u/DDo)
#### Post date: [May 7, 2020, 3:55pm UTC](https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701/5 "2020-05-07T15:55:07Z")

</div>

Thank you Jay, that seems to be a workaround.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 7, 2024, 11:03pm UTC](https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701/6 "2024-07-07T23:03:47Z")

</div>



---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 8, 2024, 12:06am UTC](https://meta.discourse.org/t/users-updated-at-not-renewed-on-all-updates/150701/7 "2024-07-08T00:06:41Z")

</div>


