Jump to content

Limit Access For Unverified Accounts


sentq

Recommended Posts

These ActionHook functions will add some restrictions to unverified accounts.

 

Current features:

1) Prevent account from placing orders in WHMCS, and display error message guide them to activate first.

2) Change account status to Inactive after x days.

3) Change account status to Closed after x days.

 

Do not hesitate to share any ideas, requests or features to extend this functions.

 

 

Download

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for sharing. I'm new to hooks - Do you know how I can check if email verification has been completed in an action hook? I'm not using capsule, so would this code still work?

 

if (!is_null($client) && $client->emailVerified!==true){

 

Also, a suggestion for you, rather than CLOSEACCOUNTAFTERXDAYS how about a resendverification afterxdays function (I don't think the system does that). I suppose you'd need to apply the resend only to newly created accounts.

Edited by sol2010
Link to comment
Share on other sites

Thanks for sharing. I'm new to hooks - Do you know how I can check if email verification has been completed in an action hook? I'm not using capsule, so would this code still work?

 

if (!is_null($client) && $client->emailVerified!==true){

you may use something like that


use WHMCS\View\Menu\Item as MenuItem;

$client = Menu::context("client");

if (!is_null($client) && $client->emailVerified===true){
   // Client email verified
}
else {
   // Client email not verified yet or not logged-in
}

 

Also, a suggestion for you, rather than CLOSEACCOUNTAFTERXDAYS how about a resendverification afterxdays function (I don't think the system does that). I suppose you'd need to apply the resend only to newly created accounts.

I will add it as optional function in the next update

 

Thank you :)

Link to comment
Share on other sites

  • 2 years later...
On 5/14/2016 at 3:28 AM, sentq said:

These ActionHook functions will add some restrictions to unverified accounts.

 

Current features:

1) Prevent account from placing orders in WHMCS, and display error message guide them to activate first.

2) Change account status to Inactive after x days.

3) Change account status to Closed after x days.

 

Do not hesitate to share any ideas, requests or features to extend this functions.

 

 

Download

Thanks, but i am not able to download it. I am receiving 404 Page Not Found Error.

Link to comment
Share on other sites

  • 1 month later...
On 5/14/2016 at 12:28 AM, sentq said:

These ActionHook functions will add some restrictions to unverified accounts.

 

Current features:

1) Prevent account from placing orders in WHMCS, and display error message guide them to activate first.

2) Change account status to Inactive after x days.

3) Change account status to Closed after x days.

 

Do not hesitate to share any ideas, requests or features to extend this functions.

 

 

Download

Can you please share a new URL? This one is broken, i get a 404 Not Found Page
http://nimb.ws/ohF17L

Link to comment
Share on other sites

  • 2 years later...
3 hours ago, JesusSuarz said:

after checking this. I see that it does not work. could you check the code? apparently stopped working for whmcs v8

going by the v8 class docs, I assume it should now be $client->isEmailAddressVerified rather than $client->emailVerified

Link to comment
Share on other sites

  • 3 weeks later...
  • 9 months later...

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