# Change user's email without verification

**URL:** <https://meta.discourse.org/t/change-users-email-without-verification/66602>\
**Category:** Self-hosting\
**Tags:** rails-console\
**Created:** [21 ביולי,‏ 2017,‏ 3:47pm UTC](https://meta.discourse.org/t/change-users-email-without-verification/66602 "2017-07-21T15:47:04Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Iceman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iceman/32/181309_2.png) [@Iceman](https://meta.discourse.org/u/Iceman)\
**Post date:** [11 בספטמבר,‏ 2020,‏ 10:24am UTC](https://meta.discourse.org/t/change-users-email-without-verification/66602/10 "2020-09-11T10:24:09Z")

</div>

Massive Necromancy, yes, but I’m experiencing a similar issue and since the search took me here it may be relevant to update the commands based on this experience.

My situation is as follows:

- Some of my users tried to change their main e-mail.

- They claim it didn’t work. That they received an e-mail to confirm but when clicking on the link it always gives an “Expired/Doesn’t Work” message.

- I go as an Admin to change said e-mail, do it by editing their profile.

- Now the main e-mail is “waiting confirmation/verification”.

- The users don’t receive any confirmation e-mail.

- No matter how many times I press the “resend validation/confirmation e-mail” option on their profile, it doesn’t send (checked on the Admin/E-mail section, no outgoing e-mail for that. Ironically if I click to send them the “reset password e-mail” that one **does** send).

Thing is, if any of those users cleans cookies/etc they won’t be able to access their account again (actually happening right now). So I tried this:

> [@schungx](#):
>
> The following commands should work:
> 
> ```plaintext
> cd /var/discourse
> sudo ./launcher enter app
> rails c
> 
> UserEmail.find_by(email: "oid@example.com").update(email: "new@example.com")
> 
> ```

But I’m getting `NoMethodError: undefined method `update' for nil:NilClass`. So maybe the fields changed again in the last two years? 😛

Any help is welcome.

PD: Also, if I try to change the e-mail to something else or to the old one, now I (admin) get the message “You did this action too many times. Please try again later”. How much time is later and why is the Admin rate limited on changing e-mails if I only did it once? I probably did something wrong and didn’t realized it :facepalm:

---

_[View the full topic](https://meta.discourse.org/t/change-users-email-without-verification/66602)._
