Shivansh Posted March 3, 2019 Share Posted March 3, 2019 Sir, I want , When my client login with 2 different ip or Location at a same time then whmcs is banned him. Can you help me about how i make this kind function. How to disable when client login with 2 different ip or Location. I want, my username don't share login details with others person.if him share my whmcs blocked him. Please please humble request to you please reply me. Thanks 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 4, 2019 Share Posted March 4, 2019 Simplest option would be to use the clientlogin hook and check how long ago the last login was and if under a threshold, add IP to banned IPs or lock the account. What would that work for you? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted March 4, 2019 Share Posted March 4, 2019 (edited) Before doing that, keep in mind that not everyone has an IP that's static, and some will change during the visit. It can appear to be two widely separated locations when it might be something like an ISP and IPs registered to one place but used in another. Happens fairly often. At the same time may be sharing, two devices (one mobile, one not), or some combination of those. Caution is recommended. 😉 Edited March 4, 2019 by bear 0 Quote Link to comment Share on other sites More sharing options...
Shivansh Posted March 4, 2019 Author Share Posted March 4, 2019 steven99 sir can you provide me hook file because i have not more knowledge about this. Please help me. Thanks 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 5, 2019 Share Posted March 5, 2019 I looked in to this a bit and it looks like the client's last login is updated before the ClientLogin hook is fired and thus would need another tracking method for this because WHMCS isn't storing the last session. Also, this would work best if activity was tracked and not just last login. I think an addon module with its own database table and hooks for clientlogin and clientareapages to track activity would be best. As such, would recommend to post in the requests community and see if a developer will do this for you. As @bear mentioned, caution would be needed, however, if you do activity tracking and limit the threshold to like 5 minutes it should be okay for those that switch IPs during the same sessions. 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.