Since there is no response from anyone, I’ll just keep adding new feature requests…
Two more functions that I would like:
IsLoggedIn: input User_Id and SolutionID (optional)
Return True if user is logged in, False if not. If a solutionID is supplied, the check is only made for that solutionID.
GetSolutionDetails: gives the current sollutionID + Name
will see if we can do that in the further.
for now it is purely a group/user edit.
that a user is logged in or not is already possible
getUserId() will return the id of the current logged in user
It is never for a solution.. The solution only says that you have to log in. So you will still be logged in if you open another solution in the same session.
About the check to see if a user is logged into a solution: What I’m trying to do is making sure that a user doesn’t open the same solution twice.
If I look at the Server Admin page I see that ‘it’ knows which user has which solution open. I understand that it got nothing to do with being logged in or not inn security terms.
Would it be possible to get some function to see if a user allready has got a specific solution open?
The user has the solution open that has youre method code in it that checks if the user is logged in or not!!
and only one solution can be opend at onces so what are you trying to check or todo???
that is impossible to prevent currently
and you can never test that through javascript with the security node.
because what you want is that we ask the server what clients (logged in users) are already registerd? and if the user that is currently logged in is logged in twice you want to stop loading the solution (that support we even don’t have currently)
Thinking about this a bit more: I think this check’s only possible when the user has to log in. So, presume the user has to log in for every application.
Then, if I would have the function to check if a certain userID allready has logged into the application, I could make a “OnOpenSolution” method to check if allready logged in (Would need to have the function to give me back the number of logins for a specific userid and solutionid, since when I do this check, he would allready be logged in twice). If the number of login’s for this user and solutionid > 1, I would give the "closesolution command to log the user out again.
Wouldn’t something like that be possible?
Other option is a paramater in the Server ADmin page, where you can set of users can log into an application twice.
Offcourse all of this only work when the login to a solution is mandatory.
But it should be possible to login twice…
Especially if you are walking to anothe computer to do something and you have to login from there also.. Then that will also be not possible (or we also have to check for the ip of the user_id)
But currently you are loggin in into the client, not really the server. The server does know it but that is all.
Currently we don’t have support for getting that kind of data back from the server. and if you close the solution, the user is still logged in (that is global) and will never be logged out..
You can ofcourse build one table with just the userid in there when he/she logs in you set a flag ‘logged in’ and when he/she logs out you release that flag…
Marcel, I thought of that too, but if for some reason the user logged out incorrectly and according to the data in the table it still looks like he is still logged in, he wouldn’t be able to log in anymore.
therefor I asked for the more correct way of doing it
Mmm, wouldn’t the user be able to start the application twice then from the same machine?
It’s an interesting option though. The user would be able to start multiple clients on the same machine, but not from different machines.
Only, if the application is deployed in , for example a call center, where noone has a fixed desk/computer to sit at, of the user would log out incorrectly, then go home, come back the next day and sit on a different machine, you’d still have a problem.
But then again, this could be solved by a job that resets all open “sessions” during the night.
All in all; It could work, allthough still it’s a work around if you ask me. And I don’t like workarounds