Error 500 when resending confirmation mail
Archives → Website problems & bugs → Error 500 when resending confirmation mail
SOLVED
What I expected
I tried to resend the confirmation mail for a user and I expected it to work.
What actually happened
I pressed the button and then there was a “500 - Jomo malfunction” error
Error message
“500 - Jomo malfunction” error
Reproducing the bug
- go to an unconfirmed user
- press the resend confirmation mail button
- error
Link
This guy as an example
Additional details
Only staff and unconfirmed users can test/check this out
I can also check and see if I find out why :P
Edit: You can also not send it if you have a role higher than mod Another edit: can we please change the colour of the button? it doesn’t look good ._.
if (@user.is?(current_user) || mod) && !confirmed?
I think this line is the problem, since firstly you are not checking if the user is mod and that user that is going to resend the mail have to be unconfirmed too.
So something like this: if (@user.is?(current_user) || mod?) || !confirmed
.
I have tested it and that works and as far as I know there shouldn’t be any security issues regarding it
Last Edit: I made a PR with a fix to it
I tried this again after the merge and it did work the first time, but I tried again today and it didn’t work.
I got the same error.
@jomo