Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83469

Retrieve the list of logged in users

$
0
0
Hi ,   I have been trying to create the overview page that shows the list of logged in users to the application. I found two ways to implement it, but I’m struck in both ways.   First way: I was trying to follow the approach of Call REST service to admin handler as mentioned in following URL. https://docs.mendix.com/refguide/monitoring-mendix-runtime#6-logged-in-users.   What will be the URL endpoint ? for example if application is hosted in URL https://www.abctest.com then endpoint for this request should be https://www.abctest.com:8090 How to find the value of X-M2EE-Authentication: ? as per documentation it is mentioned as password can be fetched from enviroinment variables, which I’m not sure how to find it.   Second approach: Get the list of users via java action, I was trying to implement following code but lot of error was throwing during compilation , can you please help on complete  Java action code, because i’m new to both java and mendix.   {         // BEGIN USER CODE         ArrayList userNameList = new ArrayList();         for (ISession session: Core.getActiveSessions()) {             String userName = session.getUser().getName();             userNameList.add(userName);         }         return userNameList;         // END USER CODE     }   Thanks , Balaji S

Viewing all articles
Browse latest Browse all 83469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>