yarantoos Posted January 15, 2022 Share Posted January 15, 2022 Hello, I want to staff limit login to one session. If the staff logs in with another browser or other device, all other sessions will be destroyed. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted January 16, 2022 Share Posted January 16, 2022 Would need an addon module to track the "active" session and hooks to block the other sessions. 0 Quote Link to comment Share on other sites More sharing options...
yarantoos Posted January 16, 2022 Author Share Posted January 16, 2022 Please advise how can I get "active" session of admin user ? 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted January 16, 2022 Share Posted January 16, 2022 Well, again, you would need an addon module and some hooks -- done by a PHP developer. Just hooks could do it but a module allows for options. Basically using the AdminLogin hook, a session variable containing the current timestamp for example is checked for and if exists then the session is reset and if it isn't set, it is set to the current timestamp or what not. 0 Quote Link to comment Share on other sites More sharing options...
yarantoos Posted January 17, 2022 Author Share Posted January 17, 2022 Hi. Yes . I know these myself. Please give me an example code for get/find session of admin_id. I need a code that, if a user logs in, finds the session, destroys it, and logs out automatically from other systems. 0 Quote Link to comment Share on other sites More sharing options...
Bigol'tastynuggets Posted January 17, 2022 Share Posted January 17, 2022 What ever happened to beating... sorry I mean positively reinforcing desired behaviour of employees? Lol What you need, is probably out of scope for what another user would be willing to do for someone on the community community, given the time to check and test all the required components for something like that - you'd cause a lot of issues if done incorrectly! You should probably find a developer who could quote you for that as a specific job - or put a feature request in to whmcs 😁 0 Quote Link to comment Share on other sites More sharing options...
yarantoos Posted January 17, 2022 Author Share Posted January 17, 2022 I am a programmer and whmcs developer myself. I can find the admin username through the AdminLogin hook. But I have no idea how I can check if there is another open session. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted January 17, 2022 Share Posted January 17, 2022 You can use GetStaffOnline 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.