Commit 1fe2a7c936435039a47380c5106072cb0c7772c2
1 parent
5dff1fc3
controller
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
src/app/frontend/controllers/MenuController.php
... | ... | @@ -1261,8 +1261,10 @@ class MenuController extends \controllers\ControllerBase |
1261 | 1261 | if( !empty( $data['name'] ) && !empty( $data['email'] ) ) |
1262 | 1262 | { |
1263 | 1263 | $check = $this->models->getSubscribe()->getOneDataByEmail($data['email']); |
1264 | - | |
1265 | - if( empty($check) && $this->models->getSubscribe()->addData($data) ) { | |
1264 | + if (!empty($check)) { | |
1265 | + setcookie("popup", '1', time()+3600, '/'); | |
1266 | + } | |
1267 | + elseif( empty($check) && $this->models->getSubscribe()->addData($data) ) { | |
1266 | 1268 | $this->sendmail->sendSubscribe( $data ); |
1267 | 1269 | |
1268 | 1270 | setcookie("popup", '1', time()+3600, '/'); | ... | ... |