Просмотр исходного кода

#3757 Stop account:check_join alert happening on account edit form.

Alexander 4 лет назад
Родитель
Сommit
faecb88250
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      template/scripts/BxBaseFormAccount.php

+ 2 - 0
template/scripts/BxBaseFormAccount.php

@@ -101,6 +101,8 @@ class BxBaseFormAccount extends BxTemplFormView
         if (!parent::isValid ())
             return false;
 
+        if (isLogged() || !$this->isSubmitted()) return true; // exit in case it is an account edit or form has not been submitted yet
+
         $sErrorMsg = '';
         bx_alert('account', 'check_join', 0, false, array('error_msg' => &$sErrorMsg, 'email' => $this->getCleanValue('email'), 'approve' => &$this->_bSetPendingApproval));
         if ($sErrorMsg)