add rssa-pintar to git
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
class M_login extends CI_Model{
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
}
|
||||
public function validate(){
|
||||
$username = $this->security->xss_clean($this->input->post('username'));
|
||||
$password = md5($this->security->xss_clean($this->input->post('password')));
|
||||
$this->db->where('mu_nama_user', $username);
|
||||
$this->db->where('mu_password', $password);
|
||||
$query = $this->db->get('master_user');
|
||||
if($query->num_rows() == 1)
|
||||
{
|
||||
|
||||
$row = $query->row();
|
||||
$data = array(
|
||||
's_ID_User_suratpnm' => $row->mu_id,
|
||||
's_FK_TipeUser_suratpnm' => $row->mu_tipeuser_id,
|
||||
'validated' => true
|
||||
);
|
||||
$this->session->set_userdata($data);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user