Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function index()
- {
- $this->template->title = "L33t Str33t::Card";
- $this->template->content = new View('pages/login');
- $this->template->content->username = '';
- $this->template->content->password = '';
- if(Auth::instance()->logged_in('logged_in'))
- {
- url::redirect('home');
- }
- elseif (Auth::instance()->logged_in())
- {
- url::redirect('accessdenied');
- }
- //$form=$_POST;
- $post = $this->input->post();
- if($post)
- {
- $username = $this->input->post('username');
- $password = $this->input->post('password');
- $user = ORM::factory('user', $post->username);
- Auth::instance()->login($user->username, $password);
- //url::redirect('/user/login');
- url::redirect('profile');
- }
- }
Add Comment
Please, Sign In to add comment