hogava Posted February 5, 2020 Share Posted February 5, 2020 Hello I need to use WHMCS login system for access custom PHP file? I created a php file in folder inner of whmcs and now i want just admin of whmcs can see this page. please help me about implementation of that. thanks 0 Quote Link to comment Share on other sites More sharing options...
hogava Posted February 6, 2020 Author Share Posted February 6, 2020 Someone can help me on how to use condition for WHMCS's logged-in admin in custom php page. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 6, 2020 Share Posted February 6, 2020 Hello, This can be done by first calling the WHMCS init file: require_once ("/home/path/public_html/whmcs/init.php"); Then you can use the following to check if a user is logged-in to WHMCS: <?php if ($_SESSION['uid']) { } ?> Jack 1 Quote Link to comment Share on other sites More sharing options...
hogava Posted February 8, 2020 Author Share Posted February 8, 2020 (edited) THANKS uid is id of client or is for whmcs admins? Edited February 8, 2020 by hogava 1 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 8, 2020 Share Posted February 8, 2020 2 hours ago, hogava said: THANKS uid is id of client or is for whmcs admins? uid is for the client. This code has been working for me for many versions now. 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.