summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-04-20 20:34:59 +0200
committerErmal LUÇI <eri@pfsense.org>2015-04-20 20:34:59 +0200
commit0fa9acb787f883815767ac34a3ef94f673b68aac (patch)
tree4849b38a1ef5a7e3722f0bd639878784e8d714dc /etc
parent0608bd3c354ea76eb6df9ed9322e2ef8686f15e7 (diff)
parentea6cbc390bba86336bf5a173922b20f0b3416c89 (diff)
downloadpfsense-0fa9acb787f883815767ac34a3ef94f673b68aac.zip
pfsense-0fa9acb787f883815767ac34a3ef94f673b68aac.tar.gz
Merge pull request #1617 from Gertjanpfsense/master
Diffstat (limited to 'etc')
-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