From bb8f99919fdd5e788a9eb40225d556de56bd4d1e Mon Sep 17 00:00:00 2001 From: JAMES_BOND Date: Wed, 19 Feb 2020 20:12:56 +1000 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B4=D0=B8=D1=80=D0=B5=D0=BA?= =?UTF-8?q?=D1=82=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=B7=D0=B0=D0=BB=D0=BE?= =?UTF-8?q?=D0=B3=D0=B8=D0=BD=D0=B5=D0=BD=20=D0=B8=D0=B7=20LoginView.php?= =?UTF-8?q?=20AND=20RegisterView.php=20+=20meta=5Ftitle=20=D0=B2=20passwor?= =?UTF-8?q?d=5Fremind.tpl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- design/default/html/password_remind.tpl | 1 + view/LoginView.php | 4 ++++ view/RegisterView.php | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/design/default/html/password_remind.tpl b/design/default/html/password_remind.tpl index adf64ba..20e74d2 100755 --- a/design/default/html/password_remind.tpl +++ b/design/default/html/password_remind.tpl @@ -2,6 +2,7 @@ {* Канонический адрес страницы *} {$canonical="/user/password_remind" scope=root} +{$meta_title = "Напоминание пароля" scope=root} {if $email_sent}

Вам отправлено письмо

diff --git a/view/LoginView.php b/view/LoginView.php index 6ff001f..54e7b79 100755 --- a/view/LoginView.php +++ b/view/LoginView.php @@ -20,6 +20,10 @@ public function fetch() unset($_SESSION['user_id']); header('Location: ' . $this->config->root_url, true, 302); exit(); + } // Если авторизован + elseif ($this->user) { + header('Location: '.$this->config->root_url.'/user', true, 302); + exit(); } // Вспомнить пароль elseif ($this->request->get('action') == 'password_remind') { // Если запостили email diff --git a/view/RegisterView.php b/view/RegisterView.php index ea53224..1ece636 100755 --- a/view/RegisterView.php +++ b/view/RegisterView.php @@ -15,6 +15,11 @@ class RegisterView extends View { public function fetch() { + if ($this->user) { + header('Location: '.$this->config->root_url.'/user', true, 302); + exit(); + } + $default_status = 1; // Активен ли пользователь сразу после регистрации (0 или 1) if ($this->request->method('post') && $this->request->post('register')) {