- $msg = $lang[msg_login];
- if(isset($_REQUEST[username])){
- if (do_ldap_bind($_REQUEST[username],$_REQUEST[password])){
- //forward to next page
- if(!empty($_SESSION[ldapab][lastlocation])){
- header('Location: '.$_SESSION[ldapab][lastlocation]);
- }else{
- header('Location: index.php');
- }
- exit;
+require_once('inc/init.php');
+
+$msg = $lang['msg_login'];
+if(isset($_REQUEST['username'])){
+ if (empty($_REQUEST['password'])) { $_REQUEST['password']=''; }
+ if (do_ldap_bind($_REQUEST['username'],$_REQUEST['password'])){
+ //forward to next page
+ if(!empty($_SESSION['ldapab']['lastlocation'])){
+ header('Location: '.$_SESSION['ldapab']['lastlocation']);
+ }else{
+ header('Location: index.php');
+ }
+ exit;