Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Easyme

Newbie
  
  • Posts

    2
  • Joined

  • Last visited

Easyme's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Правильный код ниже. Добавлена еще функция сброса пароля. if(!$this->customer->isLogged()) { if(empty($this->request->get['route']) || ($this->request->get['route'] != 'account/login' && $this->request->get['route'] != 'account/register' && $this->request->get['route'] != 'account/forgotten' && $this->request->get['route'] != 'account/reset')) { $this->response->redirect($this->url->link('account/login', '', 'SSL')); } }
  2. Спасибо за подсказку. Единственное, если все сделать так как тут написано, перестанет работать форма регистрации и форма восстановления пароля, так как везде будет требовать авторизацию. Для того чтобы добавить страницу регистрации и восстановления пароля в исключения нужно подправить код примерно так: if(!$this->customer->isLogged()) { if(empty($this->request->get['route']) || ($this->request->get['route'] != 'account/login' && $this->request->get['route'] != 'account/register' && $this->request->get['route'] != 'account/forgotten')) { $this->response->redirect($this->url->link('account/login', '', 'SSL')); } }
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.