floyd Posted August 15, 2007 Share Posted August 15, 2007 In the admin section if you suspend a client that is on a DirectAdmin server and then you click the Suspend button again it will unsuspend the client but leave the Status as suspended. I suspect the same is true of the Unsuspend button. Either button will do the opposite of whatever the current status is. I know this is a DirectAdmin API problem because I have experienced it myself with my own programs. However the work around is to first check the current status and compare it with what you are trying to do and only run the suspend/unsuspend command if you are trying to do the opposite of what the current staus already is. Another case for having the true status of a client come from polling the server he is on. I know it can be done because I am currently running a cron job to update the database directly since of course the WHMCS code is encrypted. Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 15, 2007 WHMCS CEO Share Posted August 15, 2007 And what's the problem with this exactly? Why would you click the button to Suspend if it's already suspended? Matt Link to comment Share on other sites More sharing options...
floyd Posted August 15, 2007 Author Share Posted August 15, 2007 I know Matt, as a programmer I ask myself the same question all the time when dealing with other people. I wouldn't do it. But I know people who will. If there is a way to screw up something people will find a way to do it. So I guess its my opinion to not trust that people will not click the Suspend button again. As programmers, again its my opinion that we should try to prevent every problem we can think of. I was just letting you know about the possible problem. If you don't think its a problem then don't fix it. It doesn't bother me because I know better. But I know I have customers constantly doing stupid stuff and ask over and over again "Why would you do that?" for things I never would have thought they would have done, but they did. I still think its good for people to at least be aware of this behavior. With DirectAdmin the Suspend and Unsuspend buttons do the exact same thing. They change the current status to the opposite of whatever it already is. Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 15, 2007 WHMCS CEO Share Posted August 15, 2007 Hi Floyd, Totally agree with you there, I just think it's something DA needs to react to rather than us. I'll send them an email asking to get seperate functions added into the API. Matt Link to comment Share on other sites More sharing options...
floyd Posted August 15, 2007 Author Share Posted August 15, 2007 I plan on bring it to DA's attention too. Previously I had written my own stuff and knew how to get around their flaws so I didn't worry about it. But I am using WHMCS now which I cannot modify so I need to bring it to your attention as well as DA's. If DA doesn't fix especially the password problem in the other bug report soon then we or I need to do something about it soon. I can run a cron job that checks the status in WHMCS and then makes sure the DA server has the same so a client get resuspended if necessary. With the password bug a client can unsuspend himself and we would never know it. Link to comment Share on other sites More sharing options...
othellotech Posted August 15, 2007 Share Posted August 15, 2007 And what's the problem with this exactly? Why would you click the button to Suspend if it's already suspended? We've seen suspended cpanel accounts become "active" again through bugs in WHM itself over the years, so having some sort of "reality check report" of mismatches between WHMCS and the server(s) would be very useful Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 16, 2007 WHMCS CEO Share Posted August 16, 2007 An update from DirectAdmin Hello, I've fixed the unsuspending issue already in the code, and added a non-toggle option to the versions system for the next release for you. http://www.directadmin.com/features.php?id=806 http://www.directadmin.com/features.php?id=807 Thank you, John Matt Link to comment Share on other sites More sharing options...
floyd Posted August 16, 2007 Author Share Posted August 16, 2007 That is a fairly quick response. Both WHMCS and DirectAdmin have been quick to respond to bugs or whatever support is needed. I know WHMCS and DirectAdmin are small companies and you guys often are able to handle more than the big companies. I believe in small businesses. Thanks to all. Link to comment Share on other sites More sharing options...
Recommended Posts