Setting a profile property in asp.net MVC while creating a user.
- by twal
In my application, an authorized user will Register a new customer and set their username and password, etc. The customer will not be registering them self.
I have the following code in a class file which creates the new user, and it works just fine.
public MembershipCreateStatus CreateUser(string userName, string password, string email, string employeeID)
{
if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
if (String.IsNullOrEmpty(password)) throw new ArgumentException("Value cannot be null or empty.", "password");
if (String.IsNullOrEmpty(email)) throw new ArgumentException("Value cannot be null or empty.", "email");
MembershipCreateStatus status;
/// _membershipProvider.CreateUser("asdas","ds123BB", email, "asdasd", "asdasdad", true, null, out status);
_membershipProvider.CreateUser(userName, password, email, null, null, true, null, out status);
string answer = status.ToString();
return status;
}
However I would also like to set an employeeID property for the profile when creating this user.
how would I set the EmployeeID when creating a new user??
Thanks