mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixes #4625 correct disconnection of users especially when called from xmlrpc code.
This commit is contained in:
parent
99d263f587
commit
41ee551453
@ -217,7 +217,7 @@ EOF;
|
||||
}
|
||||
|
||||
function voucher_expire($voucher_received) {
|
||||
global $g, $config, $cpzone;
|
||||
global $g, $config, $cpzone, $cpzoneid;
|
||||
|
||||
// XMLRPC Call over to the master Voucher node
|
||||
if(!empty($config['voucher'][$cpzone]['vouchersyncdbip'])) {
|
||||
@ -279,6 +279,8 @@ 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($cpzoneid) && !empty($config['captiveportal'][$cpzone]))
|
||||
$cpzoneid = $config['captiveportal'][$cpzone]['zoneid'];
|
||||
captiveportal_disconnect($cpentry,null,13);
|
||||
captiveportal_logportalauth($cpentry[4],$cpentry[3],$cpentry[2],"FORCLY TERMINATING VOUCHER {$voucher} SESSION");
|
||||
$unsetindexes[] = $cpentry[5];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user