mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Created validate_device_id() function
This commit is contained in:
@@ -916,4 +916,19 @@ function scan_new_plugins()
|
||||
|
||||
}
|
||||
|
||||
function validate_device_id($id)
|
||||
{
|
||||
|
||||
global $config;
|
||||
$device_id = dbFetchCell("SELECT `device_id` FROM `devices` WHERE `device_id` = ?", array($id));
|
||||
if($device_id == $id)
|
||||
{
|
||||
$return = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
}
|
||||
return($return);
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user