CaptivePortal, fix typo, when calling stopAccounting() check if stopAccounting() exists and not startAccounting() (although both are true ;) )

This commit is contained in:
Ad Schellevis 2018-04-22 18:59:17 +02:00
parent fb8b63f4c4
commit f9acc51bb7

View File

@ -81,7 +81,7 @@ if ($result !== false) {
$stmt->bindParam(':zoneid', $row['zoneid']);
$stmt->bindParam(':sessionid', $row['sessionid']);
$stmt->execute();
if (method_exists($authenticator, 'startAccounting')) {
if (method_exists($authenticator, 'stopAccounting')) {
$time_spend = time() - $row['created'];
$authenticator->stopAccounting($row['username'], $row['sessionid'], $time_spend, $row['bytes_in'], $row['bytes_out'], $row['ip_address']);
}