|
@@ -137,11 +137,16 @@ class BxInvTemplate extends BxBaseModGeneralTemplate
|
|
|
if(!$oForm->isValid())
|
|
if(!$oForm->isValid())
|
|
|
return array('content' => $sForm, 'content_id' => $sFormId, 'eval' => $sEval);
|
|
return array('content' => $sForm, 'content_id' => $sFormId, 'eval' => $sEval);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- $iCountByEmail = $this->_oDb->getRequests(array('type' => 'count_by_email', 'value' => $oForm->getCleanValue('email')));
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $sEmail = $oForm->getCleanValue('email');
|
|
|
|
|
+ $oAccountQuery = BxDolAccountQuery::getInstance();
|
|
|
|
|
+ $iAccount = $oAccountQuery->getIdByEmail($sEmail);
|
|
|
|
|
+ if ($iAccount > 0)
|
|
|
|
|
+ return array('content' => MsgBox(_t('_bx_invites_err_already_registed', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password'))), 'content_id' => $sFormId, 'eval' => $sEval);
|
|
|
|
|
+ $iCountByEmail = $this->_oDb->getRequests(array('type' => 'count_by_email', 'value' => $sEmail));
|
|
|
if ($iCountByEmail > 0)
|
|
if ($iCountByEmail > 0)
|
|
|
return array('content' => MsgBox(_t('_bx_invites_err_already_send')), 'content_id' => $sFormId, 'eval' => $sEval);
|
|
return array('content' => MsgBox(_t('_bx_invites_err_already_send')), 'content_id' => $sFormId, 'eval' => $sEval);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$sIp = getVisitorIP();
|
|
$sIp = getVisitorIP();
|
|
|
$iId = (int)$oForm->insert(array('nip' => ip2long($sIp),'date' => time()));
|
|
$iId = (int)$oForm->insert(array('nip' => ip2long($sIp),'date' => time()));
|
|
|
if(!$iId)
|
|
if(!$iId)
|