seems he asked it on 2 places, its perspective.
Here is what i answered there, tho i can't really test it myself
sessions = system.perspective.getSessionInfo()
current_id = self.session.props.id
current_user = self.session.props.auth.user.userName
for row in sessions:
if row["username"] == current_user and row["id"] != current_id and row["sessionScope"] != "designer":
for page in row["pageIds"]:
system.perspective.logout(row["id"], page)