AntonLV 6 سال پیش
والد
کامیت
fb951ae0a8
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      modules/boonex/convos/classes/BxCnvModule.php

+ 5 - 1
modules/boonex/convos/classes/BxCnvModule.php

@@ -528,7 +528,11 @@ class BxCnvModule extends BxBaseModTextModule
      */
     public function checkAllowedContact($iProfileId, $isPerformAction = false)
     {
-        $mixedResult = BxDolProfile::getInstance($iProfileId)->checkAllowedProfileContact();
+        $oProfile = BxDolProfile::getInstance($iProfileId);
+        if(!$oProfile)
+            return _t('_sys_txt_access_denied');
+
+        $mixedResult = $oProfile->checkAllowedProfileContact();
         if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
             return _t('_sys_txt_access_denied');