Jump to content
  • 0

Force user to logout during login


DennisHermannsen

Question

Hi.

I'm currently building a module for WHMCS that allows clients to see a list of all logins and a list of unique logins.

In the table that shows unique logins, the client has an option to prevent a certain IP from logging in to the client's account.

I just need a way to force WHMCS to prevent the user from logging in. Any ideas?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
7 minutes ago, DennisHermannsen said:

I just need a way to force WHMCS to prevent the user from logging in. Any ideas?

I assume adding that IP to the Banned IP list is too global a solution and might cause issues as this check needs to be on a per client basis.

can you use a ClientLogin hook, get the user details, e.g whether it's a client/contact, get their IP and then check a table for this client/contact and IP address combination? if found, then redirect them to logout.php ??

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated