Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super admin cannot change e-mail for user #8958

Open
michnovka opened this issue Feb 17, 2024 · 7 comments
Open

Super admin cannot change e-mail for user #8958

michnovka opened this issue Feb 17, 2024 · 7 comments
Assignees
Labels
🏋️‍♂️ accepting-community-prs 🧄 feature/agent-ui Common issues in agent dashboard that cannot be attributed to a specific feature Feature Created by Linear-GitHub Sync

Comments

@michnovka
Copy link

Describe the bug

Super admin should be able to change "verified e-mail", without the need of e-mail confirmation of the new email by user.

To Reproduce

  1. create a user with email test@email.com
  2. confirm the user e-mail (either by clicking on confirm link in test@email.com inbox or setting confirmed time in super admin CP)
  3. change the user e-mail to new@email.com

Expected behavior

Super admin should have total control over the data, so the VERIFIED email should be changed, not requiring confirmation by the affected user.

Possible implementation:

  1. add a checkbox "Skip e-mail confirmation" on the edit form, which if ticked, will not send a confirmation link and consider the new value gospel
  2. show "unverified e-mail" on the edit user form (now this is not shown) and next to it a button "Mark as verified"

Environment

Docker

Cloud Provider

None

Platform

Browser

Operating system

N/A

Browser and version

N/A

Docker (if applicable)

N/A

Additional context

N/A

@michnovka michnovka added the Bug label Feb 17, 2024
Copy link

linear bot commented Feb 17, 2024

@sojan-official sojan-official added 🏋️‍♂️ accepting-community-prs Feature Created by Linear-GitHub Sync and removed Bug labels Feb 18, 2024
@LiamAshdown
Copy link
Contributor

Hi @sojan-official

I am happy to take this. Are you able to provide a user story?

@sojan-official
Copy link
Member

sojan-official commented Feb 22, 2024

@LiamAshdown Thanks a lot. Let me revert with the spec.
Meanwhile, feel free to start exploring if you have any ideas.

@pranavrajs pranavrajs added the 🧄 feature/agent-ui Common issues in agent dashboard that cannot be attributed to a specific feature label Feb 22, 2024 — with Linear
@jxs714
Copy link

jxs714 commented Mar 2, 2024

Just tried this and have the same issue. I cannot change and save the new admin user email. When I do save it, it shows it in the dashboard as unconfirmed and even though I ended up confirming the new email confirmation via email, nothing happens.

@jxs714
Copy link

jxs714 commented Mar 2, 2024

Update: In order for me to force the change, I had to run the rails command that @sojan-official provided here:

#2513 (comment)

You guys should resolve this to fix in the admin GUI.

@jxs714
Copy link

jxs714 commented Mar 2, 2024

Update: Spoke too soon, this worked but it deleted ALL of my previous inbox configurations with the previous email that was configured.. I created almost 10 mailbox pipe configurations and lost them all... smh... how can fix this??

Update: It seems the only fix is clearing browser cache as mentioned here: #7744

I cleared redis cache in the backend of Chatwoot and it fixes it temporarily until you refresh browser. Weird

@te-dious
Copy link

te-dious commented Jul 4, 2024

email_updates = [
  {
    "old_email": "old_email@gmail.com",
    "new_email": "new_email@gmail.com"
  },
]

email_updates.each do |update|
  user = User.find_by(email: update[:old_email])
  if user
    user.update_columns(email: update[:new_email], uid: update[:new_email])
  else
    puts "User with email #{update[:old_email]} not found"
  end
end

In order to update the email without triggering the signal/pre-save action you can use update_columns
The above script worked for me, to update emails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏋️‍♂️ accepting-community-prs 🧄 feature/agent-ui Common issues in agent dashboard that cannot be attributed to a specific feature Feature Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

6 participants