edit customer radius

This commit is contained in:
Ibnu Maksum
2023-10-04 15:41:48 +07:00
parent e87623d918
commit 0ee60eff3d
3 changed files with 117 additions and 84 deletions

View File

@ -134,6 +134,14 @@ class Radius
}
return false;
}
public static function planDelete($plan_id){
// Delete Plan
Radius::getTablePackage()->where_equal('plan_id', "plan_".$plan_id)->delete_many();
// Delete User Plan
Radius::getTableUserPackage()->where_equal('groupname', "plan_".$plan_id)->delete_many();
}
public static function customerChangeUsername($from, $to){
$c = Radius::getTableCustomer()->where_equal('username', $from)->findMany();
if ($c) {
@ -162,6 +170,11 @@ class Radius
}
}
public static function customerDelete($username){
Radius::getTableCustomer()->where_equal('username', $username)->delete_many();
Radius::getTableUserPackage()->where_equal('username', $username)->delete_many();
}
/**
* When add a plan to Customer, use this
*/