Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
449678d6
Commit
449678d6
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: get_full_tree must follow same filter rule thant list of users
parent
3c4dfba9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/user/class/user.class.php
+8
-2
8 additions, 2 deletions
htdocs/user/class/user.class.php
with
8 additions
and
2 deletions
htdocs/user/class/user.class.php
+
8
−
2
View file @
449678d6
...
...
@@ -2235,8 +2235,14 @@ class User extends CommonObject
// Init $this->users array
$sql
=
"SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.login, u.statut"
;
// Distinct reduce pb with old tables with duplicates
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"user as u"
;
$sql
.
=
" WHERE u.entity IN ("
.
getEntity
(
'user'
,
1
)
.
")"
;
if
(
!
empty
(
$conf
->
multicompany
->
enabled
)
&&
$conf
->
entity
==
1
&&
(
!
empty
(
$conf
->
multicompany
->
transverse_mode
)
||
(
!
empty
(
$user
->
admin
)
&&
empty
(
$user
->
entity
))))
{
$sql
.
=
" WHERE u.entity IS NOT NULL"
;
}
else
{
$sql
.
=
" WHERE u.entity IN ("
.
getEntity
(
'user'
,
1
)
.
")"
;
}
dol_syslog
(
get_class
(
$this
)
.
"::get_full_tree get user list sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment