This error was logged on a fully up to date discourse:
Discourse::InvalidParameters (email) /var/www/discourse/app/controllers/users_controller.rb:487:in `change_email’
- Allow emails to be changed
- visit a user’s profile
- enter in a duplicate email
- Get a normal warning
this will be logged:
Hmm can you repro this @techapj?
Yes, I was able to repro this. I made two fixes:
change button will be disabled when the email is duplicate (i.e. same as user’s current email).
In case the new email user provided is already in use by another user than instead of serving 500 (Internal Server Error), 422 error will be served with proper error message.