SametALMDR Posted May 18, 2019 Share Posted May 18, 2019 Hi everyone, I wanted to check any sidebar item is disable or not but ı couldn't do it such as in the following add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar){ if($primarySidebar->getChild("My Account")->getChild("Security Settings")->isDisabled()){ echo "exist"; } else{ echo "not exist"; } }); It gives an error when there is no security question because it returns null but how can ı use is that exist or not ? 0 Quote Link to comment Share on other sites More sharing options...
SametALMDR Posted May 18, 2019 Author Share Posted May 18, 2019 Actually the thing that ı want to check is the securtiy questions part is enabled or disabled.Is there any variable exist in whmcs to check it as well ? 0 Quote Link to comment Share on other sites More sharing options...
SametALMDR Posted May 21, 2019 Author Share Posted May 21, 2019 @brian! 🙂 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 22, 2019 Share Posted May 22, 2019 On 18/05/2019 at 21:43, SametALMDR said: Actually the thing that ı want to check is the securtiy questions part is enabled or disabled.Is there any variable exist in whmcs to check it as well ? Security questions aren't really enabled from a setting, they're enabled when you add a security question from the admin area - so the way to test would be to query the database, specifically the tbladminsecurityquestions table and do a row count - if it's more than 0 (I think it's empty on installation - but check that), then security questions should have been enabled. 0 Quote Link to comment Share on other sites More sharing options...
SametALMDR Posted May 23, 2019 Author Share Posted May 23, 2019 ı just wanted to know is there any variable that checking existence the security question enable or not. Thanks Brian 🙂 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.