Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Daftar Front Office
- public function listuserfrontoffice_post()
- {
- $username = trim($this->post('username'));
- if ($username == '') {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'Username Kosong.',
- ];
- } else {
- $listUser = $this->db->get_where('bpmppt_users', array('device_id !=' => '', 'user_level' => 'Front Office'))->result();
- if (count($listUser) > 0) {
- foreach ($listUser as $r) {
- $response['items'][] = [
- 'resp_error' => false,
- 'user_username' => $r->user_username,
- 'user_name' => $r->user_name,
- 'device_id' => $r->device_id,
- ];
- }
- } else {
- $response = [
- 'resp_error' => true,
- 'resp_msg' => 'Device Tidak Ditemukan.',
- ];
- }
- }
- $this->response($response, 200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement