X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=lxo-import%2Fimport_lib.php;h=6fef1ecf03ed98b083be5caab63e20c3bc8c8fbd;hb=ca865495f86d40196a33cf279f55b4fc541cbf3c;hp=c60975afd9fca1de3990ed89bfe810a0b39fa97c;hpb=4d1373d76f01dc7bd1cd363279341125f0e07f0e;p=kivitendo-erp.git diff --git a/lxo-import/import_lib.php b/lxo-import/import_lib.php index c60975afd..6fef1ecf0 100644 --- a/lxo-import/import_lib.php +++ b/lxo-import/import_lib.php @@ -302,7 +302,7 @@ function anmelden() { $dbhost=($hits[1])?$hits[1]:"localhost"; preg_match("/'port'[ ]*=> '(.+)'/",$tmp,$hits); $dbport=($hits[1])?$hits[1]:"5432"; - preg_match("/^[ ]*\$self->\{cookie_name\}[ ]*=[ ]*'(.+)'/",$tmp,$hits); + preg_match("/[ ]*\\\$self->\{cookie_name\}[ ]*=[ ]*'(.+)'/",$tmp,$hits); $cookiename=$hits[1]; if (!$cookiename) $cookiename='lx_office_erp_session_id'; $cookie=$_COOKIE[$cookiename]; @@ -363,10 +363,14 @@ function authuser($dbhost,$dbport,$dbuser,$dbpasswd,$dbname,$cookie) { $db->query($sql2,"authuser_B"); $sql3="insert into session ";*/ } + $sql="select * from auth.user where id=".$rs[0]["id"]; + $rs1=$db->getAll($sql,"authuser_1"); + if (!$rs1) return false; + $auth=array(); + $auth["login"]=$rs1[0]["login"]; $sql="select * from auth.user_config where user_id=".$rs[0]["id"]; $rs1=$db->getAll($sql,"authuser_2"); - $auth=array(); - $keys=array("login","dbname","dbpasswd","dbhost","dbport","dbuser"); + $keys=array("dbname","dbpasswd","dbhost","dbport","dbuser"); foreach ($rs1 as $row) { if (in_array($row["cfg_key"],$keys)) { $auth[$row["cfg_key"]]=$row["cfg_value"];