Adds a new user to the Visual Guard repository.
Namespace: Novalys.VisualGuard.Security.WebFormAssembly: Novalys.VisualGuard.Security.WebForm (in Novalys.VisualGuard.Security.WebForm.dll) Version: 2017.0.101.17 (2017.0.101.17)
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 |
---|
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.
- 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
Type: MembershipUserA VGMembershipUser object for the newly created user.
Exceptions
Exception | Condition |
---|---|
Novalys.VisualGuard.Security.Membership..::..VGMembershipCreateUserException | The user was not created. Check the StatusCode property for a VGMembershipCreateStatus value. |
System..::..ArgumentNullException | username is null. |
System..::..ArgumentException |
The providerUserKey parameter is not null.
- or - username is empty or is longer than 64 characters or contains comma. |