SimpleMembershipProvider.CreateAccount(String, String, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.