Concurrent User Login

Hi,

How can I prompt a message if the same user is trying to login in to Aras, if he's already logged in.
I tried on click on the Login button of Aras LoginPage.

Parents
  • Hello,

    Could you let us know what version of Aras Innovator you are using? If you're using 12.0, this will be more difficult as the functionality of the login page is now handled by the OAuthServer. One workaround if you're simply trying to send the user a message and not prevent the login is to simply perform a check after the login succeeds and the client loads.

    The general idea of what you'd need to do is to first check if the User already has a session signed in. One example of a view that lets you see this is the License Manager dialog available through the admin user menu under Licenses > License Manager.

    This will show you all of the users that currently have sessions open. After looking at the code for this dialog, I found that you can get this information by sending a specific request to the server. The JavaScript code for this request is the single line below.

    var res = aras.soapSend("GetUsersList", "<GetUsersList/>");

    Once you get the response, you can parse it and check if the login name of the user matches one of the names with an open session. If so, you can throw up a message to let them know that they are already signed in elsewhere.


    Chris

    Christopher Gillis

    Aras Labs Software Engineer

  • Hello Chris,

    I am using Aras 11 SP 12 version. I want to prevent the user from logging in by displaying a message. I tried using JavaScript code that you have mentioned in the loginPage.js, unfortunately I am unable to achieve the desired output.

  • Hello,

    I'm not sure this will be possible from the code of the login page itself. In order to run the query, the user first needs to sign in, so that the aras object has some credentials to communicate to the Aras Innovator server.

    I'd recommend checking out my suggestion on this other forum post of using a SuccessfulLogin system event.

    https://community.aras.com/f/archive/4848/how-to-limit-that-forbid-two-browsers-use-one-account-to-login

    Chris

Reply Children