Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2013-04-25 20:39:47 +02:00
commit 4c1f301f4e
2 changed files with 5 additions and 2 deletions

View File

@ -377,7 +377,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

View File

@ -143,7 +143,10 @@ if (! defined('NOREQUIREDB'))
{
$conf->entity = DOLENTITY;
}
// TODO Multicompany Remove this.
else if (!empty($_COOKIE['DOLENTITY'])) // For other application with MultiCompany module
{
$conf->entity = $_COOKIE['DOLENTITY'];
}
else if (! empty($conf->multicompany->force_entity) && is_int($conf->multicompany->force_entity)) // To force entity in login page
{
$conf->entity = $conf->multicompany->force_entity;