SimpleMembershipProvider.CreateAccount(String, String, Boolean) Method

Definition

Creates a new user account by using the specified user name and password.

public override string CreateAccount (string userName, string password, bool requireConfirmationToken);
override this.CreateAccount : string * string * bool -> string
Public Overrides Function CreateAccount (userName As String, password As String, requireConfirmationToken As Boolean) As String

Parameters

userName
String

The user name.

password
String

The password.

requireConfirmationToken
Boolean

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

Returns

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

Exceptions

username is empty.-or-username already has a user account.-or-password is empty.-or-password is longer than 128 characters.-or-A user record that corresponds to username does not exist in the UserTableName table (the user profile table).-or-The database operation failed.

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

Applies to