summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal_mac.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/services_captiveportal_mac.php')
-rwxr-xr-xusr/local/www/services_captiveportal_mac.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr/local/www/services_captiveportal_mac.php b/usr/local/www/services_captiveportal_mac.php
index 7c40b85..f7aa502 100755
--- a/usr/local/www/services_captiveportal_mac.php
+++ b/usr/local/www/services_captiveportal_mac.php
@@ -64,8 +64,15 @@ if ($_POST) {
clear_subsystem_dirty('passthrumac');
}
- if ($_POST['delmac'] && $_POST['postafterlogin']) {
- if (is_array($a_passthrumacs)) {
+ if ($_POST['postafterlogin']) {
+ if (!is_array($a_passthrumacs))
+ exit;
+ if ($_POST['username']) {
+ $mac = captiveportal_passthrumac_findbyname($_POST['username']);
+ if (!empty($mac))
+ $_POST['delmac'] = $mac['mac'];
+ }
+ if ($_POST['delmac']) {
$found = false;
foreach ($a_passthrumacs as $idx => $macent) {
if ($macent['mac'] == $_POST['delmac']) {
OpenPOWER on IntegriCloud