コード例 #1
0
 public function delete_array($array)
 {
     if (!empty($array["id"])) {
         $user = apiDB::getUserByLocationId($array["id"]);
         if ($_SERVER['PHP_AUTH_USER'] != $user->email && $this->access <= 1) {
             return "Not authorized to delete location for User " . $user->id;
         }
         return apiDB::deleteLocation($array["id"]);
     }
     return "ERROR: No location ID specified for deletion";
 }