# User attributes

**URL:** <https://meta.discourse.org/t/user-attributes/315619>\
**Category:** Development\
**Tags:** rails-console\
**Created:** [July 9, 2024, 5:21pm UTC](https://meta.discourse.org/t/user-attributes/315619 "2024-07-09T17:21:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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 9, 2024, 7:08pm UTC](https://meta.discourse.org/t/user-attributes/315619/4 "2024-07-09T19:08:54Z")

</div>

They can’t be edited because they aren’t part of the user model.

There’s a model that keeps up with what topics a user has viewed (`TopicViewItem`), so you’d need to clear those (maybe `TopicViewItem.destroy_all` – no – that doesn’t work.) and then run whatever updates that. And if they were emailed, then the last time they were emailed is going to be the last time they were emailed.

There’s a `PostTiming` model that keeps up with what posts are read, and  
read time. Ah, you can search the source for `PostTiming` and find something like

```plaintext
      PostTiming.destroy_for(current_user.id, [topic_id])

```

So that’s a start. Maybe this:

```plaintext
      PostTiming.destroy_for(1, PostTiming.where(user_id: 1).pluck(:topic_id).uniq))

```

There are some `ensureconsistency` tasks that might be how to update those, but I’m not quite sure.

---

_[View the full topic](https://meta.discourse.org/t/user-attributes/315619)._
