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
df9beac8
Commit
df9beac8
authored
Nov 29, 2007
by
Richard Mansfield
Browse files
Function to check if user is an institutional admin for a particular institution
parent
103884b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/auth/user.php
View file @
df9beac8
...
...
@@ -362,9 +362,12 @@ class User {
&&
(
is_null
(
$role
)
||
$institutions
[
$institution
]
->
{
$role
});
}
public
function
is_institutional_admin
()
{
public
function
is_institutional_admin
(
$institution
=
null
)
{
$a
=
$this
->
get
(
'admininstitutions'
);
return
!
empty
(
$a
);
if
(
is_null
(
$institution
))
{
return
!
empty
(
$a
);
}
return
isset
(
$a
[
$institution
]);
}
public
function
set_admin_institutions
(
$institutions
)
{
...
...
Write
Preview
Markdown
is supported
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