From 810c5ae82780e883a9e8e46c49eef55d433c02d2 Mon Sep 17 00:00:00 2001 From: ABDALRAHMAN MOLOOD Date: Mon, 5 Aug 2024 15:52:14 +0300 Subject: [PATCH] Update init.php - add Boolean function isMysqlRadius() to check if the system is using Radius mysql or not. --- init.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/init.php b/init.php index e5e02676..e636d04d 100644 --- a/init.php +++ b/init.php @@ -348,3 +348,13 @@ function displayMaintenanceMessage(): void $ui->display('maintenance.tpl'); die(); } + +function isMysqlRadius() +{ + try { + $record = ORM::forTable('radacct', 'radius')->find_one(); + return $record !== false; + } catch (Exception $e) { + return false; + } +}