X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=login.php;h=2aa4d16e0ca693d767929bc02409947d22c3f86d;hb=2a315687e20d9bb539c725c6cb28ae206e02a487;hp=96ba2368200c1f23879cddbe14c05271483c9aa8;hpb=e5e982801086e26aaacd4e9706b2854972ae264c;p=contagged diff --git a/login.php b/login.php index 96ba236..2aa4d16 100644 --- a/login.php +++ b/login.php @@ -1,25 +1,44 @@ - array ('organizationalUnit','top'), + 'ou' => $match[1])); + } + } + + //forward to next page + if(!empty($_SESSION['ldapab']['lastlocation'])){ + header('Location: '.$_SESSION['ldapab']['lastlocation']); + }else{ + header('Location: index.php'); + } + exit; }else{ - $msg = $lang['msg_loginfail'];; + $msg = $lang['msg_loginfail'];; } - } +}else{ + //logout + unset($_SESSION['ldapab']); +} + +//prepare templates +tpl_std(); +$smarty->assign('msg',$msg); +//display templates +header('Content-Type: text/html; charset=utf-8'); +$smarty->display('login.tpl'); - //prepare templates - tpl_std(); - $smarty->assign('msg',$msg); - //display templates - header('Content-Type: text/html; charset=utf-8'); - $smarty->display('login.tpl'); -?>