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
2dbd0e3d
Commit
2dbd0e3d
authored
Jul 16, 2010
by
Richard Mansfield
Browse files
Allow standard controlled groups to be created in cron scripts
Signed-off-by:
Richard Mansfield
<
richardm@catalyst.net.nz
>
parent
94d84edd
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/grouptype/standard/lib.php
View file @
2dbd0e3d
...
...
@@ -50,7 +50,7 @@ class GroupTypeStandard extends GroupType {
public
static
function
user_allowed_join_types
(
$user
,
$all
=
false
)
{
$jointypes
=
array
(
'open'
,
'request'
,
'invite'
);
if
(
defined
(
'INSTALLER'
)
||
$all
||
$user
->
get
(
'admin'
)
||
$user
->
get
(
'staff'
)
||
$user
->
is_institutional_admin
()
||
$user
->
is_institutional_staff
())
{
if
(
defined
(
'INSTALLER'
)
||
defined
(
'CRON'
)
||
$all
||
$user
->
get
(
'admin'
)
||
$user
->
get
(
'staff'
)
||
$user
->
is_institutional_admin
()
||
$user
->
is_institutional_staff
())
{
$jointypes
[]
=
'controlled'
;
}
return
$jointypes
;
...
...
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