Commit 64c433d5 authored by Ad Schellevis's avatar Ad Schellevis

coding style system_usermanager.php

parent ef486094
......@@ -211,7 +211,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
//
// the client side is (jquery) generates the actual download file.
$username = $a_user[$id]['name'];
$authFactory = new \OPNsense\Auth\AuthenticationFactory;
$authFactory = new \OPNsense\Auth\AuthenticationFactory();
$authenticator = $authFactory->get("Local API");
$keyData = $authenticator->createKey($username);
if ($keyData != null) {
......@@ -221,7 +221,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} elseif ($act =='delApiKey' && isset($id)) {
$username = $a_user[$id]['name'];
if (!empty($pconfig['api_delete'])) {
$authFactory = new \OPNsense\Auth\AuthenticationFactory;
$authFactory = new \OPNsense\Auth\AuthenticationFactory();
$authenticator = $authFactory->get("Local API");
$authenticator->dropKey($username, $pconfig['api_delete']);
$savemsg = gettext("API key")." {$pconfig['api_delete']} ".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment