Jump to content

How to know whoever is login and running the application ?


hendrang

Recommended Posts

  • 2 weeks later...
Hi Hendra ... this code does what you ask for ... I found it in this forum ...
 
regards
 

mmurgas

var
  I: Integer;
  ASessionList: TList;
begin
  unimemo1.Lines.Clear;
  ASessionList := UniServerModule.SessionManager.Sessions.SessionList.LockList;
  try
    for I := 0 to ASessionList.Count - 1 do
    begin
      UniMemo1.Lines.Add(TUniGUISession(ASessionList[I]).UniApplication.RemoteAddress);
    end;
  finally
    UniServerModule.SessionManager.Sessions.SessionList.UnlockList;
  end;
Link to comment
Share on other sites

 

Hi Hendra ... this code does what you ask for ... I found it in this forum ...
 
regards
 

mmurgas

var
  I: Integer;
  ASessionList: TList;
begin
  unimemo1.Lines.Clear;
  ASessionList := UniServerModule.SessionManager.Sessions.SessionList.LockList;
  try
    for I := 0 to ASessionList.Count - 1 do
    begin
      UniMemo1.Lines.Add(TUniGUISession(ASessionList[I]).UniApplication.RemoteAddress);
    end;
  finally
    UniServerModule.SessionManager.Sessions.SessionList.UnlockList;
  end;

 

Hi mmurgas,

Thank you.

 

This is very usefull and also I am looking for. Thanks

 

TUniGUISession(ASessionList).UniApplication.RemoteAddress returns all of the user IPAddress who are ever login including users' IP Address already logged out.

 

I need list of login users' IP Adddress and still running the application only exclude logged out users' IP Address.

 

Regards,

Hendra

 

 

 

 

 

 

 

 
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...