Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextA workflow context that contains properties that are associated with the active workflow instance.
userNameObj
Type: System.ObjectThe user login name.
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.