Commit 0c267b83 authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Fix default quota for institutions on registration

When a user registers, they either join the institution
direct, or request joining. Set the default quota if they join direct
either by the institution config allowing them to, or the institutional
adminstrator approving their registration.

If they only request membership because of the way the institution config
is setup, then just use the default sitewide quota

Change-Id: I9888618684871a972c9628e868c3248a5fc5f926
Signed-off-by: default avatarHugh Davenport <>
parent 781e3f8e
......@@ -171,6 +171,14 @@ if (isset($key)) {
$user->username = get_new_username($user->firstname . $user->lastname);
$user->passwordchange = 1;
if ($registration->institution != 'mahara') {
if (count_records_select('institution', "name != 'mahara'") == 1 || $registration->pending == 2) {
if (get_config_plugin('artefact', 'file', 'institutionaloverride')) {
$user->quota = get_field('institution', 'defaultquota', 'name', $registration->institution);
create_user($user, $profilefields);
// If the institution is 'mahara' then don't do anything
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment