I am building an MVC4 app in which users will be registered by a site admin. The site admin will enter everything but the password of course. I then generate a token and send via email for them to set their password. However, I don't see a way to create a user without a password. I can either randomly generate one or assign one in the code. What is the best way to handle not having a password at account creation?

EDIT: I used Membership.GeneratePassword for generate the password when I created the account.

有帮助吗?

解决方案

Create a random password and allow them to change once the account is confirmed. Solves a number of problems.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top