Jump to content

Prevent Client Access Until Payment Received?


dan76

Recommended Posts

I have "Allow Client Registration" disabled in the General Settings, but this doesn't prevent a user from getting access to the Client Portal. If a user starts the checkout process, they are still granted access to the Client Portal even if they don't complete payment.

 

I want to prevent users from accessing the Client Portal until after their payment is received and I have manually approved their account. Is this possible?

 

The main reason why I want to do this is because I plan to add new pages to WHMCS with access to paying members only.

 

Any help or ideas on how to implement this would be appreciated. I've searched the forums/wiki, but couldn't find the best alternative.

Link to comment
Share on other sites

I want to prevent users from accessing the Client Portal until after their payment is received and I have manually approved their account. Is this possible?

Yes, add a hook to on client creation to set the status to closed, and another to on order accept to set it to active

 

The main reason why I want to do this is because I plan to add new pages to WHMCS with access to paying members only.

Or just put the code to check access level/rights in the new pages ...

Link to comment
Share on other sites

Yes, add a hook to on client creation to set the status to closed, and another to on order accept to set it to active

 

Or just put the code to check access level/rights in the new pages ...

 

I think a hook will be the best option. Unfortunately, the documentation on hooks is very limited and not very telling. Would adding a hook bypass the ClientLogin function that occurs during the checkout process?

 

So far, I have the basics but can't determine what function is actually needed in the hook.

 

<?php
function status_closed($vars) {

// what type of code would go here?

add_hook("ClientAdd",1,"status_closed");
?>

 

Any direction you can provide would be appreciated. I've been through the forums and documentation, but can't seem to get the info I need.

 

Thanks again.

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
Reply to this topic...

×   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