fix sync expired
This commit is contained in:
parent
88aca9bac5
commit
1e80e5d929
@ -95,7 +95,7 @@ switch ($action) {
|
|||||||
$p = ORM::for_table('tbl_plans')->where('id', $b['plan_id'])->where('enabled', '1')->find_one();
|
$p = ORM::for_table('tbl_plans')->where('id', $b['plan_id'])->where('enabled', '1')->find_one();
|
||||||
if ($p) {
|
if ($p) {
|
||||||
if ($p['is_radius']) {
|
if ($p['is_radius']) {
|
||||||
Radius::customerAddPlan($c, $p);
|
Radius::customerAddPlan($c, $p, $p['expiration'].' '.$p['time']);
|
||||||
r2(U . 'customers/view/' . $id_customer, 's', 'Success sync customer to Radius');
|
r2(U . 'customers/view/' . $id_customer, 's', 'Success sync customer to Radius');
|
||||||
} else {
|
} else {
|
||||||
$mikrotik = Mikrotik::info($b['routers']);
|
$mikrotik = Mikrotik::info($b['routers']);
|
||||||
@ -327,7 +327,7 @@ switch ($action) {
|
|||||||
if($userDiff){
|
if($userDiff){
|
||||||
Radius::customerChangeUsername($oldusername, $username);
|
Radius::customerChangeUsername($oldusername, $username);
|
||||||
}
|
}
|
||||||
Radius::customerAddPlan($d, $p);
|
Radius::customerAddPlan($d, $p, $p['expiration'].' '.$p['time']);
|
||||||
}else{
|
}else{
|
||||||
$mikrotik = Mikrotik::info($c['routers']);
|
$mikrotik = Mikrotik::info($c['routers']);
|
||||||
if ($c['type'] == 'Hotspot') {
|
if ($c['type'] == 'Hotspot') {
|
||||||
|
@ -50,7 +50,7 @@ switch ($action) {
|
|||||||
$p = ORM::for_table('tbl_plans')->findOne($plan['plan_id']);
|
$p = ORM::for_table('tbl_plans')->findOne($plan['plan_id']);
|
||||||
$c = ORM::for_table('tbl_customers')->findOne($plan['customer_id']);
|
$c = ORM::for_table('tbl_customers')->findOne($plan['customer_id']);
|
||||||
if($plan['routers'] == 'radius'){
|
if($plan['routers'] == 'radius'){
|
||||||
Radius::customerAddPlan($c, $p, $plans['expiration'].' '.$plans['time']);
|
Radius::customerAddPlan($c, $p, $plan['expiration'].' '.$plan['time']);
|
||||||
}else{
|
}else{
|
||||||
if ($plan['type'] == 'Hotspot') {
|
if ($plan['type'] == 'Hotspot') {
|
||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
Mikrotik::addHotspotUser($client, $p, $c);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user