Collapse
Submit a Service Request
Contact Information for Technical Support
My Service Notifications
Get the site name in Customer Portal customizations
Answer ID 12087 |
Last Review Date 02/14/2022
How do I identify the current site in a PHP customization?
Environment:
- Customer Portal 3.x
- PHP customizations (custom model, controller, etc.)
Issue:
Developer wants to retrieve the name of the site programmatically so that different logic can be used between the production, test, and upgrade environments.
Resolution:
The name of the site is in the configuration setting DB_NAME. In Customer Portal you can retrieve it with:
\RightNow\Utils\Config::getConfig(DB_NAME);
Notes:
This does not apply to custom scripts or custom processes.