Share via


SPClaimsAuthMembershipProvider.CreateUser method

Adds a new membership user to the data source.

Namespace:  Microsoft.SharePoint.Administration.Claims
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.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 SPClaimsAuthMembershipProvider
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
)

Parameters

  • passwordQuestion
    Type: System.String

    The password question for the new user.

  • passwordAnswer
    Type: System.String

    The password answer for the new user.

  • isApproved
    Type: System.Boolean

    true to indicate that the user is approved to log on; otherwise, false.

  • providerUserKey
    Type: System.Object

    The unique ID for the user from the membership data source.

Return value

Type: System.Web.Security.MembershipUser
Information about the newly created user.

Remarks

This override adds a new membership user to the data source in the membership provider that is not an SPClaimsAuthMembershipProvider, and is used by forms-based authentication in the current application.

See also

Reference

SPClaimsAuthMembershipProvider class

SPClaimsAuthMembershipProvider members

Microsoft.SharePoint.Administration.Claims namespace