Skip to content
Snippets Groups Projects
Commit 9e545e96 authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #6538 from hregis/4.0_bug3

FIX wrong user fetch when same login in different entity
parents 60a9268f f03bdb91
Branches
Tags
No related merge requests found
...@@ -576,9 +576,10 @@ if (! defined('NOLOGIN')) ...@@ -576,9 +576,10 @@ if (! defined('NOLOGIN'))
{ {
// We are already into an authenticated session // We are already into an authenticated session
$login=$_SESSION["dol_login"]; $login=$_SESSION["dol_login"];
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login, LOG_DEBUG); $entity=$_SESSION["dol_entity"];
dol_syslog("This is an already logged session. _SESSION['dol_login']=".$login." _SESSION['dol_entity']=".$entity, LOG_DEBUG);
$resultFetchUser=$user->fetch('',$login); $resultFetchUser=$user->fetch('',$login,'',1,($entity > 0 ? $entity : -1));
if ($resultFetchUser <= 0) if ($resultFetchUser <= 0)
{ {
// Account has been removed after login // Account has been removed after login
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment