UserPermission.UserId Property

Gets the e-mail address of the user whose permissions on the current form are determined by the specified UserPermission object.

Namespace:  Microsoft.Office.InfoPath
Assembly:  Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)

Syntax

'Declaration
Public MustOverride ReadOnly Property UserId As String
    Get
'Usage
Dim instance As UserPermission
Dim value As String

value = instance.UserId
public abstract string UserId { get; }

Property Value

Type: System.String
The user's e-mail address.

Remarks

An instance of the UserPermission class associates a set of permissions on the current form with a single user and an optional expiration date. The UserId property returns the e-mail address of the user whose permissions are determined by the UserPermission object.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Examples

In the following example, clicking the Button control gets the specified user from UserPermissionsCollection for the current form, and then displays that user's e-mail address.

public void CTRL1_Clicked(object sender, ClickedEventArgs e)
{
   MessageBox.Show(Permission.UserPermissions[1].UserId);
}
Public Sub CTRL1_Clicked(ByVal sender As Object, _
   ByVal e As ClickedEventArgs)
   MessageBox.Show(Permission.UserPermissions[1].UserId)
End Sub

See Also

Reference

UserPermission Class

UserPermission Members

Microsoft.Office.InfoPath Namespace