| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- *
- * @defgroup DolphinCore Dolphin Core
- * @{
- */
- bx_import('BxTemplPage');
- /**
- * Account page.
- */
- class BxBasePageAccount extends BxTemplPage {
- protected $_aMapStatus2LangKey = array (
- BX_PROFILE_STATUS_PENDING => '_sys_txt_account_pending',
- BX_PROFILE_STATUS_SUSPENDED => '_sys_txt_account_suspended',
- );
- public function __construct($aObject, $oTemplate) {
- parent::__construct($aObject, $oTemplate);
- bx_import('BxDolProfile');
- $oProfile = BxDolProfile::getInstance();
- $aProfileInfo = $oProfile ? $oProfile->getInfo() : false;
- $this->addMarkers(array(
- 'account_id' => $aProfileInfo ? $aProfileInfo['account_id'] : 0,
- 'profile_id' => $aProfileInfo ? $aProfileInfo['id'] : 0,
- 'profile_type' => $aProfileInfo ? $aProfileInfo['type'] : 0,
- 'profile_content_id' => $aProfileInfo ? $aProfileInfo['content_id'] : 0,
- ));
- // display message if profile isn't active
- if ($oProfile) {
- $sStatus = $oProfile->getStatus();
- if (isset($this->_aMapStatus2LangKey[$sStatus])) {
- bx_import('BxDolInformer');
- $oInformer = BxDolInformer::getInstance($this->_oTemplate);
- if ($oInformer)
- $oInformer->add('sys-account-status-not-active', _t($this->_aMapStatus2LangKey[$sStatus]), BX_INFORMER_ALERT);
- }
- }
- }
- protected function _getPageCacheParams () {
- return getLoggedId(); // cache is different for every account
- }
-
- }
- /** @} */
|