But, since username and email are the same in the model then the error occurs if you'll edit any user email to the email that’s already taken.
The Edit HttpPost method in UsersAdminController requires changes.
The model is not recreated correctly when (!result.Succeeded).
The View receives null Model.RolesList and program crashes in line 29 of Edit.scshtml View.
Steps to reproduce error in original sample.
- Login as admin
- Go to UsersAdmin
- Add new user
- Edit newly added user trying to change its e-mail to yours