My.User Object Members

The My.User Object provides access to the information about the current user.

Properties

Property

Description

CurrentPrincipal

Gets or sets the current principal (for role-based security).

This is an advanced member; it does not show in IntelliSense unless you click the All tab.

IsAuthenticated

Gets a value that indicates whether the user has been authenticated.

Name

Gets the name of the current user.

Methods

Method

Description

InitializeWithWindowsUser

Sets the thread's current principal to the Windows user that started the application.

This is an advanced member; it does not show in IntelliSense unless you click the All tab.

IsInRole

Determines whether the current user belongs to the specified role.

See Also

Reference

My.User Object