Commit fb5b9d4c810ec47c3856110540067340dd10c033

Authored by Alex Savenko
1 parent e0873f62

controller

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
src/app/frontend/controllers/MenuController.php
... ... @@ -1260,7 +1260,9 @@ class MenuController extends \controllers\ControllerBase
1260 1260  
1261 1261 if( !empty( $data['name'] ) && !empty( $data['email'] ) )
1262 1262 {
1263   - if( $this->models->getSubscribe()->addData($data) )
  1263 + $check = $this->models->getOneDataByEmail($data['email']);
  1264 +
  1265 + if( empty($check) && $this->models->getSubscribe()->addData($data) )
1264 1266 {
1265 1267 $this->sendmail->addCustomer( 10, $data );
1266 1268  
... ...