<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: can I check what are Users online or offline in xpert ivy use IUSER ?</title><link>https://answers.axonivy.com/questions/552/can-i-check-what-are-users-online-or-offline-in-xpert-ivy-use-iuser</link><description>&lt;p&gt;can I check what are Users online or offline in xpertivy use IUSER ?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/552/can-i-check-what-are-users-online-or-offline-in-xpert-ivy-use-iuser" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 04 Mar 2014 17:18:02 -0500</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/552/can-i-check-what-are-users-online-or-offline-in-xpert-ivy-use-iuser/559</link><description>&lt;p&gt;The following script only returns all sessions of the current cluster node:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ivy.session.getSecurityContext().getSessions()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To get a list of all users that are online on any cluster node of a Xpert.ivy Enterprise Server use the following code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import ch.ivyteam.ivy.security.SessionInfo;

List&amp;lt;String&amp;gt; onlineUsers;
for (SessionInfo sessionInfo : ivy.session.getSecurityContext().getClusterSessionsSnapshot().getSessionInfos())
{
    if (!sessionInfo.isSessionUserUnknown())
    {
        if (!onlineUsers.contains(sessionInfo.getSessionUserName()))
        {
            onlineUsers.add(sessionInfo.getSessionUserName());
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Tue, 04 Mar 2014 17:18:02 -0500</pubDate><guid>https://answers.axonivy.com/questions/552/can-i-check-what-are-users-online-or-offline-in-xpert-ivy-use-iuser/559</guid></item><item><title>Answer by Raphael Bürgin</title><link>https://answers.axonivy.com/questions/552/can-i-check-what-are-users-online-or-offline-in-xpert-ivy-use-iuser/555</link><description>&lt;p&gt;I don't think that this will work directly by using Iuser.&lt;/p&gt;
&lt;p&gt;I've two possibilities how I would do that.&lt;/p&gt;
&lt;p&gt;1) Get all the Sessions that are oppened on the securityContext and read the users which has this sessions created.&lt;/p&gt;
&lt;p&gt;&lt;code&gt; List&amp;lt;iuser&amp;gt; userList = new ArrayList&amp;lt;iuser&amp;gt;();
for (ISession s : Ivy.session().getSecurityContext().getSessions()){
  userList.add(s.getSessionUser());
}
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;2) Set a property on the users when they login. Then get all Users from the SecurtiyContext and check the property for each user.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;  iuser.setProperty("login", "true");&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Raphael Bürgin</dc:creator><pubDate>Thu, 27 Feb 2014 09:28:24 -0500</pubDate><guid>https://answers.axonivy.com/questions/552/can-i-check-what-are-users-online-or-offline-in-xpert-ivy-use-iuser/555</guid></item><item><title>Comment by roland on toantp's question</title><link>https://answers.axonivy.com/questions/552/can-i-check-what-are-users-online-or-offline-in-xpert-ivy-use-iuser#554</link><description>&lt;p&gt;if you download this project, a overview of online Users is given. 
&lt;code&gt;https://guidelines.soreco.ch/attachments/787/AdminAddOns.zip&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The user Management of ivy Server (5.08) also shows whether a user is logged on or not.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">roland</dc:creator><pubDate>Thu, 27 Feb 2014 09:07:28 -0500</pubDate><guid>https://answers.axonivy.com/questions/552/can-i-check-what-are-users-online-or-offline-in-xpert-ivy-use-iuser#554</guid></item></channel></rss>