Fix Admin List for Admin

This commit is contained in:
Ibnu Maksum
2024-02-20 10:58:50 +07:00
parent 349a1d3250
commit 2063ae4159
11 changed files with 61 additions and 45 deletions

View File

@ -515,6 +515,18 @@ class Mikrotik
$client->sendSync($smsRequest);
}
public static function getIpHotspotUser($client, $username){
global $_app_stage;
if ($_app_stage == 'demo') {
return null;
}
$printRequest = new RouterOS\Request(
'/ip hotspot active print',
RouterOS\Query::where('user', $username)
);
return $client->sendSync($printRequest)->getProperty('address');
}
public static function addIpToAddressList($client, $ip, $listName, $comment = '')
{
global $_app_stage;