Jump to content

Get user logged in PC (Client Side)


yordysv

Recommended Posts

Hello everyone,

 

I created an application in which i have to get the user connected to machine (client side) in order to log on the user to the applicacion, but instead it is returning the User of the Server.

 

This is the function that i am using to get the user connected.

 

function GetCurrentUserName : String;
var
  dwI : DWord;
begin
  dwI := 1024;
  SetLength (Result, dwI + 1);
   if GetUserName(PChar(Result), dwI)then
      SetLength (Result, dwI-1)
   else
      SetLength (Result, 0);
end;

 

 

I'd really appreciate your help.

 

Kind Regards

 

Yordys Valenzuela 

Link to comment
Share on other sites

  • 2 weeks later...

Remember that the browse can't  access all client resources, I guess  that there are JS library for to get the active directory Users 

Here something that I guess can Help you 

 

http://idprogramming.blogspot.com/2011/06/how-to-get-user-data-from-active.html

 

 

 

 

This javascript unfortunately working only in IE

 

anyone still use IE ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...