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
dd7970b5
Commit
dd7970b5
authored
11 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Regression, so introduce option to restore old behaviour.
parent
e76f2170
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/usergroup.class.php
+11
-6
11 additions, 6 deletions
htdocs/user/class/usergroup.class.php
with
11 additions
and
6 deletions
htdocs/user/class/usergroup.class.php
+
11
−
6
View file @
dd7970b5
...
...
@@ -178,9 +178,10 @@ class UserGroup extends CommonObject
* Return array of users id for group this->id (or all if this->id not defined)
*
* @param string $excludefilter Filter to exclude
* @param int $mode 0=Return array of user instance, 1=Return array of users id only
* @return array Array of users
*/
function
listUsersForGroup
(
$excludefilter
=
''
)
function
listUsersForGroup
(
$excludefilter
=
''
,
$mode
=
0
)
{
global
$conf
,
$user
;
...
...
@@ -211,11 +212,15 @@ class UserGroup extends CommonObject
{
if
(
!
array_key_exists
(
$obj
->
rowid
,
$ret
))
{
$newuser
=
new
User
(
$this
->
db
);
$newuser
->
fetch
(
$obj
->
rowid
);
$ret
[
$obj
->
rowid
]
=
$newuser
;
if
(
$mode
!=
1
)
{
$newuser
=
new
User
(
$this
->
db
);
$newuser
->
fetch
(
$obj
->
rowid
);
$ret
[
$obj
->
rowid
]
=
$newuser
;
}
else
$ret
[
$obj
->
rowid
]
=
$obj
->
rowid
;
}
if
(
!
empty
(
$obj
->
usergroup_entity
))
if
(
$mode
!=
1
&&
!
empty
(
$obj
->
usergroup_entity
))
{
$ret
[
$obj
->
rowid
]
->
usergroup_entity
[]
=
$obj
->
usergroup_entity
;
}
...
...
@@ -744,4 +749,4 @@ class UserGroup extends CommonObject
}
}
?>
?>
\ No newline at end of file
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