Commit dd353569 authored by Ad Schellevis's avatar Ad Schellevis

fix CP login

parent b62380ea
......@@ -223,6 +223,7 @@ EOD;
if ($loginok){
captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"LOGIN");
portal_allow($clientip, $clientmac,$_POST['auth_user']);
portal_reply_page($redirurl, "redir", "Just redirect the user.");
} else {
captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"FAILURE");
portal_reply_page($redirurl, "error", $errormsg);
......
......@@ -154,7 +154,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
else if (!empty($config['captiveportal'][$cpzone]['redirurl']))
$my_redirurl = $config['captiveportal'][$cpzone]['redirurl'];
if(isset($config['captiveportal'][$cpzone]['logoutwin_enable']) && !$passthrumac) {
if(isset($config['captiveportal'][$cpzone]['logoutwin_enable']) ) {
$ourhostname = portal_hostname_from_client_ip($clientip);
$protocol = (isset($config['captiveportal'][$cpzone]['httpslogin'])) ? 'https://' : 'http://';
$logouturl = "{$protocol}{$ourhostname}/";
......@@ -167,6 +167,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
include("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html");
} else {
// TODO: remove? should be handled by login page
portal_reply_page($my_redirurl, "redir", "Just redirect the user.");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment