Small cleanups
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 15 Mar 2010 13:22:25 +0000 (13:22 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 15 Mar 2010 13:22:25 +0000 (13:22 +0000)
CHANGELOG.txt
includes/current_user.inc
includes/session.inc

index 7bb7a3ad11b2cb6bdd549596e5bc36cac74b2f07..f1b78fec593c8a19b78b717dc361e06c4786f35c 100644 (file)
@@ -19,6 +19,11 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+15-Mar-2010 Janusz Dobrowolski
+# Smaller clenaups.
+$ /includes/current_user.inc
+  /includes/session.inc
+
 10-Mar-2010 Joe Hunt
 ! Print full Location name on reports
 $ /reporting/rep105.php
index bca45f0875cdcd589a6430b5b701498979e04d67..ea106e152b081c57a51d0a0215ae6f0ceed87990 100644 (file)
@@ -193,7 +193,7 @@ class current_user
                                $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, 
                                $show_hints, $profile, $rep_popup, $query_size, $graphic_links, $lang, $stickydate, $startup_tab);
                }
-               $this->prefs = new user_prefs($user);
+               $this->prefs = new user_prefs(get_user($this->user));
        }
 }
 
index ee6d2ff81e71234fa0f4cae51047fc66dc11db35..e083f932f66a338a5021cf0377bc60deb5252515 100644 (file)
@@ -231,7 +231,9 @@ if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){
                                $Ajax->activate('_page_body');
                        exit;
                } else {
-                       $succeed = $_SESSION["wa_current_user"]->login($_POST["company_login_name"],
+
+                       $succeed = isset($db_connections[$_POST["company_login_name"]]) &&
+                               $_SESSION["wa_current_user"]->login($_POST["company_login_name"],
                                $_POST["user_name_entry_field"], md5($_POST["password"]));
                        // select full vs fallback ui mode on login
                        $_SESSION["wa_current_user"]->ui_mode = $_POST['ui_mode'];