summaryrefslogtreecommitdiffstats
path: root/etc/inc/voucher.inc
diff options
context:
space:
mode:
authorGertjan <Gertjanpfsense@users.noreply.github.com>2015-04-17 08:50:30 +0200
committerGertjan <Gertjanpfsense@users.noreply.github.com>2015-04-17 08:50:30 +0200
commitea6cbc390bba86336bf5a173922b20f0b3416c89 (patch)
tree70fdba8eefcb467a6421053f0db2ffa58591c7f8 /etc/inc/voucher.inc
parentabaa7feb680dc6f6f9bc79577075c45b3786a061 (diff)
downloadpfsense-ea6cbc390bba86336bf5a173922b20f0b3416c89.zip
pfsense-ea6cbc390bba86336bf5a173922b20f0b3416c89.tar.gz
Update voucher.inc
As https://redmine.pfsense.org/issues/4625
Diffstat (limited to 'etc/inc/voucher.inc')
-rw-r--r--etc/inc/voucher.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index 932a515..512c0e2 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -291,9 +291,10 @@ function voucher_expire($voucher_received) {
/* Check if this voucher has any active sessions */
$cpentry = captiveportal_read_db("WHERE username = '{$voucher}'");
- if (!empty($cpentry)) {
+ if (!empty($cpentry) && !empty($cpentry[0])) {
if (empty($cpzoneid) && !empty($config['captiveportal'][$cpzone]))
$cpzoneid = $config['captiveportal'][$cpzone]['zoneid'];
+ $cpentry = $cpentry[0];
captiveportal_disconnect($cpentry,null,13);
captiveportal_logportalauth($cpentry[4],$cpentry[3],$cpentry[2],"FORCLY TERMINATING VOUCHER {$voucher} SESSION");
$unsetindexes[] = $cpentry[5];
OpenPOWER on IntegriCloud