Freigeben über


Web.EnsureUser-Methode

Checks whether the specified logon name belongs to a valid user of the website, and if the logon name does not already exist, adds it to the website.

Namespace:  Microsoft.SharePoint.Client
Assemblys:   Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (in Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)

Syntax

'Declaration
Public Function EnsureUser ( _
    logonName As String _
) As User
'Usage
Dim instance As Web
Dim logonName As String
Dim returnValue As User

returnValue = instance.EnsureUser(logonName)
public User EnsureUser(
    string logonName
)

Parameter

  • logonName
    Typ: System.String

    The logon name (Domain\User_Alias) of the user.

Rückgabewert

Typ: Microsoft.SharePoint.Client.User
Returns User.

Siehe auch

Referenz

Web Klasse

Web-Member

Microsoft.SharePoint.Client-Namespace