# 更改帖子所有权后再更改原作者用户名，编辑历史中仍会显示旧用户名

**URL:** <https://meta.discourse.org/t/changing-ownership-of-a-post-and-then-changing-the-username-of-op-will-still-show-old-username-in-post-edit-history/95120>\
**Category:** Bug\
**Created:** [2018年八月19日 21:05 UTC](https://meta.discourse.org/t/changing-ownership-of-a-post-and-then-changing-the-username-of-op-will-still-show-old-username-in-post-edit-history/95120 "2018-08-19T21:05:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vespura](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vespura/32/206564_2.png) [@Vespura](https://meta.discourse.org/u/Vespura)\
**Post date:** [2018年八月19日 21:05 UTC](https://meta.discourse.org/t/changing-ownership-of-a-post-and-then-changing-the-username-of-op-will-still-show-old-username-in-post-edit-history/95120/1 "2018-08-19T21:05:20Z")

</div>

I’m not sure if this is a known issue, because I couldn’t find a similar post on the forums here but I might’ve overlooked something.

If you change the ownership of a post from user `A` to user `B`, and then you change the username of user `A` to `C`, and you view the post edit history of that post you changed ownership, it’ll still show `"Ownership transferred from A to B"` even though the image/username _after_ that message **is** correct.

Example:  
original username was `mozzarella` and it was later changed to `mozzarella2` after the ownership of that post was changed.

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/a/aaa0f822cde8f5cbc39dfe37f152079020aabd4c.png)

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年八月20日 05:03 UTC](https://meta.discourse.org/t/changing-ownership-of-a-post-and-then-changing-the-username-of-op-will-still-show-old-username-in-post-edit-history/95120/2 "2018-08-20T05:03:36Z")

</div>

@gerhard I guess this is a tiny spot we missed?

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2018年八月20日 09:05 UTC](https://meta.discourse.org/t/changing-ownership-of-a-post-and-then-changing-the-username-of-op-will-still-show-old-username-in-post-edit-history/95120/4 "2018-08-20T09:05:13Z")

</div>

That’s really hard to fix and it requires a full table scan of the `post_revisions` table. This edge case is probably not worth the performance impact.

I think it’s best if we simply stop putting the usernames in the edit reason.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2018年八月20日 09:27 UTC](https://meta.discourse.org/t/changing-ownership-of-a-post-and-then-changing-the-username-of-op-will-still-show-old-username-in-post-edit-history/95120/5 "2018-08-20T09:27:09Z")

</div>

Yeah we only really need user id there

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2018年八月20日 10:29 UTC](https://meta.discourse.org/t/changing-ownership-of-a-post-and-then-changing-the-username-of-op-will-still-show-old-username-in-post-edit-history/95120/6 "2018-08-20T10:29:38Z")

</div>

[UX: Stop putting usernames in edit reason when changing post owner · discourse/discourse@14af90d · GitHub](https://github.com/discourse/discourse/commit/14af90df5b68548872eb06d0875c9ba41c9ecf70)
