The user was not able to edit his own password/email due to the missing invitation code

This should fix it. I also added some tests for the validation on create. Hope it helps.