Visual Guard Class Library Documentation

VGMemberShipProvider.CreateUser Method 

Adds a new user to the Visual Guard repository.

public override MembershipUser CreateUser(
   String username,
   String password,
   String email,
   String passwordQuestion,
   String passwordAnswer,
   Boolean isApproved,
   Object providerUserKey,
   out MembershipCreateStatus& status
);

Parameters

username
The user name for the new user.
password
The password for the new user.
email
The e-mail address for the new user.
passwordQuestion
The password-question value for the membership user.
passwordAnswer
The password-answer value for the membership user.
isApproved
A Boolean that indicates whether the new user is approved to log on.
providerUserKey
The unique identifier from the repository for the user. This parameter must be null when using the VGMembershipProvider class.
status
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

Exception Type Condition
VGMembershipCreateUserException The user was not created. Check the StatusCode property for a VGMembershipCreateStatus value.
ArgumentNullException username is null.
ArgumentException The providerUserKey parameter is not null.

- or -

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

See Also

VGMemberShipProvider Class | Novalys.VisualGuard.Security.WebForm Namespace