Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function before()
- {
- parent::before();
- if ( ! Session:;instance()->get('logged_in', FALSE))
- {
- $this->request->redirect('admin/login');
- }
- }
- public function action_login()
- {
- if ($_POST)
- {
- $username = arr::get($_POST, 'username');
- $password = arr::get($_POST, 'password');
- if ($username == $this->_username AND $password == $this->_password)
- {
- Session::instance()->set('logged_in', TRUE);
- }
- }
- $this->template->content = View::factory('admin/login');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement