I am creating a Log in scheme using SimpleMembershipProvider in MVC4. I wanted a little more control than what i get with the out of the box AccountControl. So I have modified the connections to use my database and table, however I would like fields like first name, last name and email to be required.
WebSecurity.CreateUserAndRole(username, password);
fails because of the required field types. I have found that I can use PropertyValues to fix this issue, however I cannot figure out how to make PropertyValues equal more than one value.
WebSecurity.CreateUserAndAccount(user.Username, user.password, propertyValues: new {firstName = user.firstName});
How do I go about using multiple PropertyValues?
I’m not sure, but can you maybe try adding another entry to the
new {}object you’re creating. Something like: