Commit 5bc2274169bf98daaaa7df778b6b056e046045fa
1 parent
6441473a
controller
Showing
1 changed file
with
6 additions
and
5 deletions
Show diff stats
src/app/frontend/controllers/MenuController.php
... | ... | @@ -1262,13 +1262,14 @@ class MenuController extends \controllers\ControllerBase |
1262 | 1262 | { |
1263 | 1263 | $check = $this->models->getSubscribe()->getOneDataByEmail($data['email']); |
1264 | 1264 | |
1265 | - if( empty($check) && $this->models->getSubscribe()->addData($data) ) | |
1266 | - { | |
1267 | - $this->sendmail->addCustomer( 10, $data ); | |
1265 | + if( empty($check)) { | |
1266 | + if ($this->models->getSubscribe()->addData($data)) { | |
1267 | + $this->sendmail->addCustomer( 10, $data ); | |
1268 | 1268 | |
1269 | - setcookie("popup", '1', time()+3600); | |
1269 | + setcookie("popup", '1', time()+3600); | |
1270 | 1270 | |
1271 | - return $this->response->redirect([ 'for' => 'homepage', 'language' => $this->lang_name ]); | |
1271 | + return $this->response->redirect([ 'for' => 'homepage', 'language' => $this->lang_name ]); | |
1272 | + } | |
1272 | 1273 | } |
1273 | 1274 | } |
1274 | 1275 | } | ... | ... |