From 69c4264e3da3eb801e4a1e0c529373e90553ecaa Mon Sep 17 00:00:00 2001
From: phpipam <miha.petkovsek@telemach.si>
Date: Mon, 29 Jan 2024 09:03:50 +0100
Subject: [PATCH] Radius fixes

---
 app/admin/authentication-methods/edit-Radius.php | 5 +++++
 functions/classes/class.User.php                 | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/admin/authentication-methods/edit-Radius.php b/app/admin/authentication-methods/edit-Radius.php
index 13a5a98a..5a8c4c65 100644
--- a/app/admin/authentication-methods/edit-Radius.php
+++ b/app/admin/authentication-methods/edit-Radius.php
@@ -150,6 +150,11 @@ $delete = $_POST['action']=="delete" ? "disabled" : "";
 		$Log->write( _("Radius login"), _("php Socket extension missing!"), 2 );
 		$Result->show("danger", _("php Socket extension missing!"), false);
 	}
+	# check for Composer errors
+	if($User->composer_has_errors (["dapphp/radius"])) {
+		print "<hr>";
+		print_r($Result->show("warning", $User->composer_err));
+	}
 	?>
 </div>
 
diff --git a/functions/classes/class.User.php b/functions/classes/class.User.php
index b3f3b7df..b0d463e2 100644
--- a/functions/classes/class.User.php
+++ b/functions/classes/class.User.php
@@ -1234,7 +1234,7 @@ class User extends Common_functions {
         $params = pf_json_decode($this->authmethodparams);
 
         # Valdate composer
-        if($this->composer_has_errors(["dapphp/radius1"])) {
+        if($this->composer_has_errors(["dapphp/radius"])) {
             $this->Result->show("danger", _("Error in authentication method. Please contact administrator").".", true);
         }
 
-- 
GitLab