|
|
@@ -438,7 +438,8 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolPro
|
|
|
*/
|
|
|
public function checkAllowedAdd ($isPerformAction = false)
|
|
|
{
|
|
|
- if ($this->serviceActAsProfile() && BxDolAccount::getInstance()->isProfilesLimitReached())
|
|
|
+ $oAccount = BxDolAccount::getInstance();
|
|
|
+ if (!$oAccount || ($this->serviceActAsProfile() && $oAccount->isProfilesLimitReached()))
|
|
|
return _t('_sys_txt_access_denied');
|
|
|
return parent::checkAllowedAdd ($isPerformAction);
|
|
|
}
|