CreateUser Method
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Adds a new membership user to the data source.
Namespace: Microsoft.CommerceServer.Runtime.Profiles
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'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
'Usage
Dim instance As UpmMembershipProvider
Dim username As String
Dim password As String
Dim email As String
Dim passwordQuestion As String
Dim passwordAnswer As String
Dim isApproved As Boolean
Dim providerUserKey As Object
Dim status As MembershipCreateStatus
Dim returnValue As MembershipUser
returnValue = instance.CreateUser(username, _
password, email, passwordQuestion, _
passwordAnswer, isApproved, providerUserKey, _
status)
public override MembershipUser CreateUser(
string username,
string password,
string email,
string passwordQuestion,
string passwordAnswer,
bool isApproved,
Object providerUserKey,
out MembershipCreateStatus status
)
public:
virtual MembershipUser^ CreateUser(
String^ username,
String^ password,
String^ email,
String^ passwordQuestion,
String^ passwordAnswer,
bool isApproved,
Object^ providerUserKey,
[OutAttribute] MembershipCreateStatus% status
) override
public override function CreateUser(
username : String,
password : String,
email : String,
passwordQuestion : String,
passwordAnswer : String,
isApproved : boolean,
providerUserKey : Object,
status : MembershipCreateStatus
) : MembershipUser
Parameters
- username
Type: System..::.String
The name of the new user.
- password
Type: System..::.String
The password for the user.
- email
Type: System..::.String
The e-mail address for the new user.
- passwordQuestion
Type: System..::.String
The password question for the new user.
- passwordAnswer
Type: System..::.String
The password answer for the specified user.
- isApproved
Type: System..::.Boolean
Whether or not the new user is approved to be validated.
- providerUserKey
Type: System..::.Object
The unique identifier from the membership data source for the user.
- status
Type: System.Web.Security..::.MembershipCreateStatus%
A System.Web.Security.MembershipCreateStatus enumeration value indicating whether the user was created successfully.
Return Value
Type: System.Web.Security..::.MembershipUser
A System.Web.Security.MembershipUser object populated with the information for the newly created user.
Remarks
Adds a new membership user to the data source.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.