SimpleMembershipProvider.CreateAccount(String, String, Boolean) SimpleMembershipProvider.CreateAccount(String, String, Boolean) 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 String String

The user name.

password
String String String

The password.

requireConfirmationToken
Boolean Boolean 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.

Applies to