Getting an ISession reference in 2.5

2
In previous versions I wrote this code to close user sessions from a Java action: for (Session s : sessions) { ISession session = Core.getSession (UUID.fromString(s.getSessionId())); String username = s.getSession_User(getContext()).getName(); Core.logout (session); } In 2.5 it won't compile because Core no longer sports a method getSession. What do we now do instead to obtain an ISession reference?
asked
2 answers
3

If you are writing a RequestHandler, the request handler has a method to retrieve the session from a cookie. Otherwise i guess you cannot retrieve session anymore. Where do you need it for?

answered
3

Maybe I don't understand your code... but don't you already have a list of Sessions? Why don't you just call

for (Session s : sessions) {
    Core.logout(s);
}

?

answered