Jump to content

Error message in client area baised on account status


superman16

Recommended Posts

Hello All!

 

I was wondering, is there some code out there that would allow me to show an error message if say the account is under a closed status?

 

so

 

if status = deactivated (show error message: This account is currently closed, please contact support to reactivate.

 

else

 

show no message

 

 

If there is a way of doing this i would be greatful for the help.

 

Many Thanks

Link to comment
Share on other sites

http://docs.whmcs.com/Clients:Profile_Tab#Changing_a_Clients_Status

 

  • Active - Can login and has active or suspended services
  • Inactive - Can login but has no active services currently
  • Closed - No active services and cannot login to the client area

so the problem you'll have is that if an account is closed, the client can't login... and if the client can't login, you can't identify them in the code to display the appropriate message.

 

If their status was "Inactive", then you could check for that (once logged in) - but as with all these things, how you would do it would depend on how/where you want to show the message... e.g, is it a notification? is it a homepage panel? in a sidebar? as a popup box? a text message on the homepage?

 

some of those could be achieved using template modifications - others would require action hooks.

Link to comment
Share on other sites

Sorry my error it was ment to read show a message when the user is inactive rarther than closed. I was planning on showing an alert on the clientarea TPL file using css.

 

- - - Updated - - -

 

Like the one displayed when the client has overdue invoices.

Link to comment
Share on other sites

if you can do it in a template, then the code below will detect if the client's account is Inactive..

 

{if $clientsdetails.status eq "Inactive"}Message{/if}

you can just replace Message with your div class and it's output will only be shown in the client is inactive.

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