SimpleMembershipProvider.CreateUserAndAccount Method

Definition

Creates a new user profile and a new membership account.

public override string CreateUserAndAccount (string userName, string password, bool requireConfirmation, System.Collections.Generic.IDictionary<string,object> values);
override this.CreateUserAndAccount : string * string * bool * System.Collections.Generic.IDictionary<string, obj> -> string
Public Overrides Function CreateUserAndAccount (userName As String, password As String, requireConfirmation As Boolean, values As IDictionary(Of String, Object)) As String

Parameters

userName
String

The user name.

password
String

The password.

requireConfirmation
Boolean

(Optional) true to specify that the user account must be confirmed by using the ConfirmAccount(String) method; otherwise, false. The default is false.

values
IDictionary<String,Object>

(Optional) A dictionary that contains additional key/value pair attributes that you can add to the data store as default values for new user profile. The key for each entry is the database column, and the value of each entry is the value for the column. The default is null.

Returns

A token that can be sent to the user to confirm the user account.

Exceptions

The SimpleMembershipProvider class was not initialized using a call to the InitializeDatabaseConnection method.

A membership account for this user name already exists in the membership database.

Applies to