diff --git a/functions/classes/class.User.php b/functions/classes/class.User.php index e2d023cc5ef5ad1386526c8e915262234de88e21..92924e1730d98e05d2ab612fd02da23bbcdbf108 100644 --- a/functions/classes/class.User.php +++ b/functions/classes/class.User.php @@ -1,5 +1,11 @@ <?php +// +// needed for radius auth +// +use Dapphp\Radius\Radius; + + /** * * User class to work with current user, authentication etc @@ -1253,8 +1259,13 @@ class User extends Common_functions { ->setNasIpAddress(gethostbyname(gethostname())) ->setAttribute(32, 'login'); + + // debug? + if($this->debugging) + $client->setDebug(true); + // fake type for testing - $params->authType = "pap"; + $params->authType = "chap"; // pap if(!isset($params->authType) || @$params->authType=="pap") { @@ -1279,10 +1290,6 @@ class User extends Common_functions { $this->Result->show("danger", _("Invalid radius authentication method"), true); } - # debug? - if($this->debugging) - $client->setDebug(true); - # authenticate user if($authenticated === true) { # check login restrictions for authenticated user