Partilhar via


Helper.GetUserId Method

Gets the ID of the user with the specified user login name.

Namespace:  Microsoft.SharePoint.WorkflowActions
Assembly:  Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)

Syntax

'Declaration
Public Shared Function GetUserId ( _
    context As WorkflowContext, _
    userNameObj As Object _
) As Integer
'Usage
Dim context As WorkflowContext
Dim userNameObj As Object
Dim returnValue As Integer

returnValue = Helper.GetUserId(context, _
    userNameObj)
public static int GetUserId(
    WorkflowContext context,
    Object userNameObj
)

Parameters

Return Value

Type: System.Int32
The ID of the user.

Remarks

This method returns -1 if the userNameObj is not successfully converted to a String object, or the user with the specified login name cannot be found.

See Also

Reference

Helper Class

Helper Members

Microsoft.SharePoint.WorkflowActions Namespace