_sParamDefaultProfileType = 'sys_account_default_profile_type'; } function enable($aParams) { $aResult = parent::enable($aParams); if(BxDolService::call($this->_aConfig['name'], 'act_as_profile') !== true) return $aResult; if($aResult['result'] && getParam($this->_sParamDefaultProfileType) == '') setParam($this->_sParamDefaultProfileType, $this->_aConfig['name']); return $aResult; } function disable($aParams) { $aResult = parent::disable($aParams); if(BxDolService::call($this->_aConfig['name'], 'act_as_profile') !== true) return $aResult; if($aResult['result'] && getParam($this->_sParamDefaultProfileType) == $this->_aConfig['name']) setParam($this->_sParamDefaultProfileType, ''); if ($aResult['result']) { // disabling was successful // TODO: switch accounts context which active profiles belong to this module } return $aResult; } } /** @} */