|
@@ -1720,11 +1720,11 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
|
|
|
*/
|
|
*/
|
|
|
public function checkAllowedAdd ($isPerformAction = false)
|
|
public function checkAllowedAdd ($isPerformAction = false)
|
|
|
{
|
|
{
|
|
|
- $oAccount = BxDolAccount::getInstance();
|
|
|
|
|
- if (!$oAccount || ($this->serviceActAsProfile() && $oAccount->isProfilesLimitReached()))
|
|
|
|
|
|
|
+ if($this->serviceActAsProfile() && ($oAccount = BxDolAccount::getInstance()) !== false && $oAccount->isProfilesLimitReached())
|
|
|
return _t('_sys_txt_access_denied');
|
|
return _t('_sys_txt_access_denied');
|
|
|
|
|
+
|
|
|
return parent::checkAllowedAdd ($isPerformAction);
|
|
return parent::checkAllowedAdd ($isPerformAction);
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @return CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden. So make sure to make strict(===) checking.
|
|
* @return CHECK_ACTION_RESULT_ALLOWED if access is granted or error message if access is forbidden. So make sure to make strict(===) checking.
|