superman16 Posted March 16, 2016 Share Posted March 16, 2016 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 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 16, 2016 Share Posted March 16, 2016 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. 0 Quote Link to comment Share on other sites More sharing options...
superman16 Posted March 16, 2016 Author Share Posted March 16, 2016 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. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 17, 2016 Share Posted March 17, 2016 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. 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.