RomanL 8 лет назад
Родитель
Сommit
b0fcbd08d3

+ 0 - 2
inc/classes/BxDolProfile.php

@@ -482,8 +482,6 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
 
         // alert about status changing
         bx_alert('profile', $sAlertActionName, $iProfileId, false, array('action' => $iAction));
-
-        $bSendEmailNotification = $bSendEmailNotification & BxDolService::call($this->getModule(), 'is_enable_profile_activation_letter');
         
         // send email to member about status change
         if ($bSendEmailNotification)

+ 1 - 1
modules/base/profile/classes/BxBaseModProfileFormsEntryHelper.php

@@ -123,7 +123,7 @@ class BxBaseModProfileFormsEntryHelper extends BxBaseModGeneralFormsEntryHelper
         // approve profile if auto-approval is enabled and profile status is 'pending'
         $sStatus = $oProfile->getStatus();
         if ($sStatus == BX_PROFILE_STATUS_PENDING && $this->isAutoApproval())
-            $oProfile->approve(BX_PROFILE_ACTION_AUTO, 0, $this->_oModule->serviceActAsProfile());
+            $oProfile->approve(BX_PROFILE_ACTION_AUTO, 0, $this->_oModule->serviceActAsProfile() & $this->_oModule->serviceIsEnableProfileActivationLetter());
 
         // set created profile some default membership
         if ((int)bx_get('level_id') && bx_srv('bx_acl', 'get_prices', [(int)bx_get('level_id'), true]))

+ 1 - 1
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -679,7 +679,7 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
     public function  serviceIsEnableProfileActivationLetter()
     {
         $CNF = &$this->_oConfig->CNF;
-        return (bool)getParam($CNF['PARAM_ENABLE_ACTIVATION_LETTER']).$CNF['PARAM_ENABLE_ACTIVATION_LETTER'];//isset($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) ? (bool)getParam($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) : true;
+        return isset($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) ? (bool)getParam($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) : true;
     }
     
     /**