cobisja / tad-php

PHP Library for ZK Time & Attendance Devices
MIT License
213 stars 159 forks source link

multiple set_user_info call issue #80

Open ashrafrafi opened 4 years ago

ashrafrafi commented 4 years ago

hello, I was trying to push the same data into multiple devices using this class. But every time it inserts in only one device. Can anyone help me with this? $device_data = array( "ip_address" => "192.168.0.1", "ip_address" => "192.168.0.2"); foreach ($device_data as $d => $devices) { $params = array('ip' => $devices["ip_address"]); $this->load->library('Tad_access', $params); $r = $this->tad_access->tad->set_user_info([ 'pin' => $insert_id . "-E", 'name' => $staff_name, 'privilege' => 1, 'password' => $rand_pass_for_attndevice ]); } this is my code. please help me.