I have found the following code to get a domain user's full name (rather than just their logon user name).
Can this be done with the Door library? If so, would someone translate it for me, please?
Can this be done with the Door library? If so, would someone translate it for me, please?
B4X:
Function GetUserName() As String
Dim DomainUser As String = System.Security.Principal.WindowsIdentity.GetCurrent.Name.Replace("\", "/")
Dim ADEntry As New System.DirectoryServices.DirectoryEntry("WinNT://" & DomainUser)
Return ADEntry.Properties("FullName").Value
End Function