My.User returns information about the current user. The following table describes the Screen object’s most useful properties.
Property or Method | Purpose |
---|---|
CurrentPrincipal | Gets or sets an IPrincipal object used for role-based security. |
InitializeWithWindowsUser | Sets the thread’s principal to the Windows user who started it. |
IsAuthenticated | Returns True if the user’s identity has been authenticated. |
IsInRole | Returns True if the user belongs to a certain role. |
Name | Returns the current user’s name in the format domain\user_name. |