From d162a61d41118af12f30df6d80402a52a3d1d65a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 25 Apr 2013 15:52:33 +0200 Subject: [PATCH] Fix: use $conf->entity if defined --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 39acc88fd5c..f51cf7b6bd3 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -374,7 +374,7 @@ if (! defined('NOLOGIN')) $usertotest = (! empty($_COOKIE['login_dolibarr']) ? $_COOKIE['login_dolibarr'] : GETPOST("username","alpha",2)); $passwordtotest = (! empty($_COOKIE['password_dolibarr']) ? $_COOKIE['password_dolibarr'] : GETPOST('password')); - $entitytotest = (GETPOST('entity','int') ? GETPOST('entity','int') : 1); + $entitytotest = (GETPOST('entity','int') ? GETPOST('entity','int') : (!empty($conf->entity) ? $conf->entity : 1)); // Validation of login/pass/entity // If ok, the variable login will be returned