Provider. Create User(String, String, String, String, String, Boolean, Object, MembershipCreateStatus) Method
Adds a new membership user to the data source.
public: abstract System::Web::Security::MembershipUser ^ CreateUser(System::String ^ username, System::String ^ password, System::String ^ email, System::String ^ passwordQuestion, System::String ^ passwordAnswer, bool isApproved, System::Object ^ providerUserKey, [Runtime::InteropServices::Out] System::Web::Security::MembershipCreateStatus % status);
public abstract System.Web.Security.MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out System.Web.Security.MembershipCreateStatus status);
abstract member CreateUser : string * string * string * string * string * bool * obj * MembershipCreateStatus -> System.Web.Security.MembershipUser
Public MustOverride Function CreateUser (username As String, password As String, email As String, passwordQuestion As String, passwordAnswer As String, isApproved As Boolean, providerUserKey As Object, ByRef status As MembershipCreateStatus) As MembershipUser
The user name for the new user.
The password for the new user.
The email address for the new user.
The password question for the new user.
The password answer for the new user
Whether or not the new user is approved to be validated.
The unique identifier from the membership data source for the user.
A MembershipCreateStatus enumeration value indicating whether the user was created successfully.
Takes, as input, the name of a new user, a password, and an email address and inserts a new user for the application into the data source. The CreateUser method returns a MembershipUser object populated with the information for the newly created user. The CreateUser method also defines an
out parameter (in Visual Basic, you can use
ByRef) that returns a MembershipCreateStatus value that indicates that the user was successfully created, or a reason that user creation failed.
The CreateUser method raises the ValidatingPassword event, if a MembershipValidatePasswordEventHandler event handler has been specified, and continues or cancels the create-user action based on the results of the event. You can use the OnValidatingPassword virtual method to execute the specified MembershipValidatePasswordEventHandler event handler.