hotspot plan radius

This commit is contained in:
Ibnu Maksum
2023-10-03 15:46:55 +07:00
parent 9e33a5740b
commit ce01771800
15 changed files with 393 additions and 242 deletions

View File

@ -44,7 +44,7 @@ switch ($action) {
if ($c) {
$mikrotik = Mikrotik::info($c['routers']);
if ($c['type'] == 'Hotspot') {
if (!$config['radius_mode']) {
if (!$config['radius_enable']) {
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
Mikrotik::setHotspotUser($client, $c['username'], $npass);
Mikrotik::removeHotspotActiveUser($client, $user['username']);
@ -57,7 +57,7 @@ switch ($action) {
r2(U . 'login');
} else {
if (!$config['radius_mode']) {
if (!$config['radius_enable']) {
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
if(!empty($d['pppoe_password'])){
Mikrotik::setPpoeUser($client, $c['username'], $d['pppoe_password']);