Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('SYSPATH') OR die('No direct access allowed.');
- class User_Model extends Model
- {
- public $auth;
- public function __construct()
- {
- parent::__construct();
- }
- public function login()
- {
- $this->input = Kohana::instance()->input;
- $username = $this->input->post('username');
- $password = $this->input->post('password');
- $user = ORM::factory('user', $username);
- $this->auth = new Auth();
- $user->username = $username;
- $user->password = $password;
- //$this->auth->login($username, $password, $remember = FALSE);
- if ($this->auth->logged_in('admin'))
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement