Adds a new user to the Visual Guard repository.

Namespace:  Novalys.VisualGuard.Security.WebForm
Assembly:  Novalys.VisualGuard.Security.WebForm (in Novalys.VisualGuard.Security.WebForm.dll) Version: 3.2.912.1 (3.2.912.01)

Syntax

C#
public override MembershipUser CreateUser(
	string username,
	string password,
	string email,
	string passwordQuestion,
	string passwordAnswer,
	bool isApproved,
	Object providerUserKey,
	out MembershipCreateStatus status
)
Visual Basic (Declaration)
Public Overrides Function CreateUser ( _
	username As String, _
	password As String, _
	email As String, _
	passwordQuestion As String, _
	passwordAnswer As String, _
	isApproved As Boolean, _
	providerUserKey As Object, _
	<OutAttribute> ByRef status As MembershipCreateStatus _
) As MembershipUser

Parameters

username
Type: System..::.String
The user name for the new user.
password
Type: System..::.String
The password for the new user.
email
Type: System..::.String
The e-mail address for the new user.
passwordQuestion
Type: System..::.String
The password-question value for the membership user.
passwordAnswer
Type: System..::.String
The password-answer value for the membership user.
isApproved
Type: System..::.Boolean
A Boolean that indicates whether the new user is approved to log on.
providerUserKey
Type: System..::.Object
The unique identifier from the repository for the user. This parameter must be null when using the VGMemberShipProvider class.
status
Type: System.Web.Security..::.MembershipCreateStatus %
A VGMembershipCreateStatus indicating that the user was created successfully or the reason creation failed.

Return Value

A VGMembershipUser object for the newly created user.

Exceptions

ExceptionCondition
Novalys.VisualGuard.Security.Membership..::.VGMembershipCreateUserExceptionThe user was not created. Check the StatusCode property for a VGMembershipCreateStatus value.
System..::.ArgumentNullExceptionusername is null.
System..::.ArgumentException The providerUserKey parameter is not null.

- or -

username is empty or is longer than 64 characters or contains comma.

See Also