Skip to content
GitLab
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
b6800b4e
Commit
b6800b4e
authored
Dec 12, 2007
by
Richard Mansfield
Browse files
Respect registerallowed on account prefs page
parent
e75c70ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/account/index.php
View file @
b6800b4e
...
...
@@ -186,7 +186,7 @@ function accountprefs_submit(Pieform $form, $values) {
// Institution forms
$institutions
=
get_records_assoc
(
'institution'
,
''
,
''
,
''
,
'name,displayname'
);
$institutions
=
get_records_assoc
(
'institution'
,
'
registerallowed
'
,
1
,
''
,
'name,displayname'
);
// For all institutions the user is already a member of, create a
// button to leave the institution
...
...
@@ -355,9 +355,14 @@ if (!empty($institutions) &&
}
function
requestmembership_submit
(
Pieform
$form
,
$values
)
{
global
$USER
;
global
$USER
,
$SESSION
;
if
(
!
empty
(
$values
[
'institution'
]))
{
$USER
->
add_institution_request
(
$values
[
'institution'
]);
if
(
get_field
(
'institution'
,
'registerallowed'
,
'name'
,
$values
[
'institution'
]))
{
$USER
->
add_institution_request
(
$values
[
'institution'
]);
}
else
{
$SESSION
->
add_error_msg
(
get_string
(
'registrationnotallowed'
));
}
}
redirect
(
get_config
(
'wwwroot'
)
.
'account/index.php'
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment