Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
044b31b3
Commit
044b31b3
authored
Nov 11, 2008
by
Richard Mansfield
Browse files
Don't show the button to add users to controlled groups they're already a member of
parent
3641f09f
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/user/view.php
View file @
044b31b3
...
...
@@ -152,13 +152,15 @@ if (!empty($loggedinid) && $loggedinid != $userid) {
AND g.deleted = 0"
,
array
(
$userid
,
$loggedinid
,
$userid
)))
{
$controlledlist
=
array
();
foreach
(
$groups
as
$group
)
{
if
(
array_key_exists
(
$group
->
id
,
$user
assoc
groups
))
{
if
(
array_key_exists
(
$group
->
id
,
$
all
usergroups
))
{
continue
;
}
if
(
$group
->
jointype
==
'request'
)
{
$requestedlist
[
$group
->
id
]
=
$group
->
name
;
}
$controlledlist
[
$group
->
id
]
=
$group
->
name
;
else
{
$controlledlist
[
$group
->
id
]
=
$group
->
name
;
}
}
$smarty
->
assign
(
'requestedlist'
,
join
(
', '
,
$requestedlist
));
if
(
count
(
$controlledlist
)
>
0
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment