1
0
Эх сурвалжийг харах

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

Alexander 4 жил өмнө
parent
commit
faecb88250

+ 2 - 0
template/scripts/BxBaseFormAccount.php

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