RomanL 8 лет назад
Родитель
Сommit
96be544653
1 измененных файлов с 9 добавлено и 6 удалено
  1. 9 6
      template/scripts/BxBaseFormAccount.php

+ 9 - 6
template/scripts/BxBaseFormAccount.php

@@ -145,13 +145,16 @@ class BxBaseFormAccount extends BxTemplFormView
             $sPwd ? array (self::$FIELD_PASSWORD => $sPasswordHash, self::$FIELD_SALT => $sSalt) : array()
         );
         
-        $oAccount = BxDolAccount::getInstance($val);
-        if ($oAccount) { 
-            $aAccountInfo = $oAccount->getInfo();
-            bx_alert('account', 'change_receive_news', 0, false, array('account_id' => $val,'old_value' =>  $aAccountInfo['receive_news'],'new_value' =>  $this->getCleanValue('receive_news'),'email' =>  $aAccountInfo['email']));
+        $bResult = parent::update ($val, $aValsToAdd, $aTrackTextFieldsChanges);
+        
+        if ($bResult){
+            $oAccount = BxDolAccount::getInstance($val);
+            if ($oAccount) { 
+                $aAccountInfo = $oAccount->getInfo();
+                bx_alert('account', 'change_receive_news', 0, false, array('account_id' => $val, 'old_value' => $aAccountInfo['receive_news'], 'new_value' => $this->getCleanValue('receive_news'), 'email' => $aAccountInfo['email']));
+            }
         }
-
-        return parent::update ($val, $aValsToAdd, $aTrackTextFieldsChanges);
+        return $bResult;
     }
 
 	protected function genCustomInputAgreement ($aInput)