Commit f347ae2a by Trần Văn Minh

chỉnh sửa add user

parent 1373a75f
......@@ -1826,7 +1826,7 @@ class Crud_model extends CI_Model {
}
public function get_organization_all($param1 = "", $is_supper_admin = "") {
if($is_supper_admin == 0) {
if($is_supper_admin == 0 && $param1 != "") {
if ($param1 != "" && $param1 != array()) {
$this->db->where_in('id', $param1);
} else {
......@@ -1834,8 +1834,14 @@ class Crud_model extends CI_Model {
$this->db->where('id', $organization_id);
}
return $this->db->get('organization');
} else
return $this->db->get('organization');
} else if ($is_supper_admin === 1) {
return $this->db->get('organization');
}
if ($param1 == "" && $is_supper_admin == "") {
$where = "parent_id != 0";
$this->db->where($where);
return $this->db->get('organization');
}
}
public function get_organ_details_by_id($id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment