Beispiel #1
0
 /**
  * Set a device disabled
  * @param $result
  * @return mixed
  */
 public function deleteDeviceRegistration($result)
 {
     // validate input
     if (!is_numeric($this->data->id)) {
         $result['error'] = "A valid id must be supplied";
         return $result;
     }
     // get location id
     $devMdl = new DevicesModel();
     if ($devMdl->removeUuid($this->data->id) !== false) {
         $result['data'] = true;
         // log data
         Logger::write("Device registration deleted with id:" . $this->data->id, "CONFIG");
     } else {
         $result['error'] = "Could not remove the device registration";
     }
     return $result;
 }