# How can I change user primary email?

**URL:** https://meta.discourse.org/t/how-can-i-change-user-primary-email/147939
**Category:** Support
**Created:** [April 14, 2020, 10:33am UTC](https://meta.discourse.org/t/how-can-i-change-user-primary-email/147939 "2020-04-14T10:33:10Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [April 14, 2020, 12:10pm UTC](https://meta.discourse.org/t/how-can-i-change-user-primary-email/147939/3 "2020-04-14T12:10:15Z")

</div>

There are many topics discussing this. You can visit the user’s profile page and change it but they’ll still need to verify their address, which is almost always a good idea.

If you want to take matters into your own hands, you can do it from the rails console. It’s much safer than direct database queries.

This might work

```plaintext
u=User.find_by_username("pat") 
UserEmail.find_by(user_id: u.id).first.update (email: "pat@gmail.com")

```

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-change-user-primary-email/147939)._
