Advertisement
Guest User

Untitled

a guest
May 12th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. <?php defined('SYSPATH') OR die('No direct access allowed.');
  2.  
  3. class User_Model extends Model
  4. {
  5.  
  6.     public $auth;
  7.  
  8.     public function __construct()
  9.     {
  10.             parent::__construct();
  11.     }
  12.  
  13.     public function login()
  14.     {
  15.         $this->input = Kohana::instance()->input;
  16.         $username = $this->input->post('username');
  17.         $password = $this->input->post('password');
  18.  
  19.  
  20.         $user = ORM::factory('user', $username);
  21.         $this->auth = new Auth();
  22.  
  23.         $user->username = $username;
  24.         $user->password = $password;
  25.  
  26.  
  27.         //$this->auth->login($username, $password, $remember = FALSE);
  28.  
  29.         if ($this->auth->logged_in('admin'))
  30.         {
  31.  
  32.         }
  33.  
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement