i would like pfsense register a new user from my custom register page and then

access to internet. I would like Pfsense save the MAC address to future access and the user data to a TXT file.

I add a new user to pfsense with user and password

I modified the index.php into directory:/usr/local/captiveportal/index.php:

Add:

if ($_POST['auth_name'] && $_POST['auth_surname'] && $_POST['auth_checkbox'] && (filter_var($_POST['auth_email'],FILTER_VALIDATE_EMAIL))){

$_POST['auth_user']='user created';

$_POST['auth_pass']='password created';

$txt= $_POST['auth_name'].";".$_POST['auth_surname'].";".$_POST['auth_email']."\n";

file_put_contents("/usr/local/captiveportal/registered_users.txt",$txt,FILE_APPEND);

}

 

 


Lascia un commento

Il tuo indirizzo email non sarĂ  pubblicato. I campi obbligatori sono contrassegnati *