Mas-J Posted July 16, 2021 Share Posted July 16, 2021 Hi, I want to show 2 value on the Client Area page when on the Switch Account Page next to the Client Name instead of Client Name only, I want add client email & company name too or something client custom field to identify the project name on that client as example. I can do similar on admin area page on other case, because it have a value for the user ID to get any data from database. But, on the Client Area Switch Account Page I can't find it Variable Type Notes companyname string logo string systemurl string charset string pagetitle string filename string template string language string LANG array Active language translation strings todaysdate string Human friendly formatted version of todays date date_day string Current day of the month date_month string Current month date_year string Current year WEB_ROOT string The web path to the WHMCS doc root BASE_PATH_CSS string BASE_PATH_JS string BASE_PATH_FONTS string BASE_PATH_IMG string token string CSRF token value servedOverSsl bool True if page was loaded via https:// Here's the code that I write, I know it's not perfect because it not tested before Is there any clue ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 23, 2021 Share Posted July 23, 2021 On 16/07/2021 at 05:47, Mas-J said: But, on the Client Area Switch Account Page I can't find it that's not a definitive list of available variables - they never are. On 16/07/2021 at 05:47, Mas-J said: Is there any clue ? I can think of two options... get the $accounts array from the template, modify it by getting the email/companyname and then returning it to the database (a clientareapage hook to only work on this one page).... then modify the relevant template (user-switch-account) to output the required changes using the values in the updated array. get the array from the template, loop through it in a output hook and use JS to add the relevant content as required... your example hook could work if the user had only one client - but if that were the case, then the switch page wouldn't be shown and so the hook wouldn't run. 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.