Code

Added maximum height for IE
[gosa.git] / gosa-core / html / index.php
index 34e0279d4cdb58a3aa42935a8ec9512510850e06..ebae5e52f7393fd19fcd7bf03632e85fdbd6fac5 100644 (file)
@@ -295,7 +295,7 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces
   $ok= true;
   if (!$htaccess_authenticated){
     $username= $_POST["username"];
-    if (!ereg("^[@A-Za-z0-9_.-]+$", $username)){
+    if (!preg_match("/^[@A-Za-z0-9_.-]+$/", $username)){
       $message= _("Please specify a valid username!");
       $ok= false;
     } elseif (mb_strlen($_POST["password"], 'UTF-8') == 0){
@@ -320,7 +320,8 @@ if (($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])) || $htacces
     if ($ui === NULL || !$ui){
       $message= _("Please check the username/password combination.");
       $smarty->assign ('nextfield', 'password');
-      new log("security","login","",array(),"Authentication failed for user \"$username\"") ;
+      session::global_set('config',$config);
+      new log("security","login","",array(),"Authentication failed for user \"$username\"");
     } else {
       /* Remove all locks of this user */
       del_user_locks($ui->dn);