|
|
@ -20,7 +20,7 @@ class Login_model extends CI_Model |
|
|
|
$regioid = $this->security->xss_clean($this->input->post('regioid')); |
|
|
|
$regioid = $this->security->xss_clean($this->input->post('regioid')); |
|
|
|
|
|
|
|
|
|
|
|
// Search for user |
|
|
|
// Search for user |
|
|
|
$this->db->select('id, regioid'); |
|
|
|
$this->db->select('id, regioid, admin, superadmin'); |
|
|
|
$this->db->where('username', $username); |
|
|
|
$this->db->where('username', $username); |
|
|
|
$this->db->where('password', sha1($password)); |
|
|
|
$this->db->where('password', sha1($password)); |
|
|
|
$this->db->where('regioid', $regioid); |
|
|
|
$this->db->where('regioid', $regioid); |
|
|
@ -35,6 +35,8 @@ class Login_model extends CI_Model |
|
|
|
$userdata = array( |
|
|
|
$userdata = array( |
|
|
|
'id' => $row->id, |
|
|
|
'id' => $row->id, |
|
|
|
'regio' => $row->regioid, |
|
|
|
'regio' => $row->regioid, |
|
|
|
|
|
|
|
'admin' => $row->admin, |
|
|
|
|
|
|
|
'superadmin' => $row->superadmin, |
|
|
|
'validated' => true |
|
|
|
'validated' => true |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|