From 89b42198c91f9b3ad7e2c2e0086b4fc80c524168 Mon Sep 17 00:00:00 2001 From: Alexander Yakovlev Date: Sun, 31 Jul 2011 10:27:17 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?=D0=BC=D0=B0=D0=BB=D0=B5=D0=BD=D1=8C=D0=BA=D0=B8=D1=85=20=D0=B8?= =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B9=20?= =?UTF-8?q?=E2=80=94=20=D1=87=D0=B8=D1=81=D1=82=D0=BA=D0=B0=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D1=8B=D1=85=20=D0=BF=D1=83=D1=82=D0=B5=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/classes/controller/login.php | 10 ++-------- application/views/footer.php | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/application/classes/controller/login.php b/application/classes/controller/login.php index 6a49bce..569f40a 100644 --- a/application/classes/controller/login.php +++ b/application/classes/controller/login.php @@ -3,17 +3,11 @@ class Controller_Login extends Controller_Template { public $template = 'login'; public function action_view() { - if(Auth::instance()->logged_in()){ - if (Auth::instance()->logged_in(array('admin')) === FALSE) return $this->request->redirect('events/view'); - return $this->request->redirect('overview/view'); - } + if(Auth::instance()->logged_in()) return $this->request->redirect(''); if ($_POST){ $user = ORM::factory('user'); $status = Auth::instance()->login($_POST['login'], $_POST['password']); - if ($status){ - if (Auth::instance()->logged_in(array('admin')) === FALSE) return $this->request->redirect('events/view'); - return $this->request->redirect('overview/view'); - } + if ($status) return $this->request->redirect(''); else $this->template->error = "Неверный логин или пароль."; } } diff --git a/application/views/footer.php b/application/views/footer.php index c2ced7d..7d36d2a 100644 --- a/application/views/footer.php +++ b/application/views/footer.php @@ -1,5 +1,5 @@ - +