31 lines
922 B
PHP
31 lines
922 B
PHP
<?php
|
|
|
|
namespace api\classes;
|
|
|
|
use api\classes\API;
|
|
|
|
require_once 'API.php';
|
|
|
|
class API_portalsettings extends API
|
|
{
|
|
public function updatePortalSettings()
|
|
{
|
|
$query = "UPDATE system_settings SET portal_name = ?, portal_provider_name = ?, admin_auth_methods = ? WHERE portal_uuid = ?";
|
|
$stmt = $this->prepareStatement($query);
|
|
$stmt->bind_param("ssss", $this->data['portal_name'], $this->data['portal_provider_name'], $this->data['admin_auth_methods'], $this->data['portal_uuid']);
|
|
|
|
if ($this->executeStatement($stmt)) {
|
|
$this->apiOutput(200, ['success' => 'portal settings updated successfully.']);
|
|
}
|
|
}
|
|
|
|
public function getPortalSettings()
|
|
{
|
|
|
|
list($query, $types, $params) = $this->buildDynamicQuery('system_settings');
|
|
|
|
$items = $this->generalGetFunction($query, $types, $params, false, 'Settings');
|
|
|
|
return ($items);
|
|
}
|
|
} |