Dubz31337 Posted May 27, 2014 Share Posted May 27, 2014 I have 2 simple questions I'd like to ask as a developer. First off, how can I see whether the user logged in is an administrator or client as well as if it's from the admin or client side? Some hooks run both admin and client side and for some I may only want to run when it's an administrator in the admin area, such as editing a client details. I don't want it to screen clients from themselves if not needed, and possibly vice versa later on, so I was just curious as to the best method of doing so. Keep in mind a user can be logged in as an administrator and client at the same time as well as spoof the headers. I could check the URL with the admin area but I want to be on the safe side with it. Secondly, how can I get the admin or client's set language? I figured out how to get the system's language but not a specific user's. If I can't do that then how can I load a proper language file from an addon when visiting a page that doesn't normally load it itself? I'll look through the original source code later to find out if need be but I was just wondering and hoping to save some time, WHMCS has a lot of files to look through 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.