Commit 829e5801 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make the file plugin only set the user's quota at createuser time if it hasn't...

Make the file plugin only set the user's quota at createuser time if it hasn't already been set. This allows the add user script to set a quota for them instead if needed.

Removed some redundant code from register.php that was doing the same thing.
parent 93c1ea8b
......@@ -73,7 +73,9 @@ class PluginArtefactFile extends PluginArtefact {
}
public static function newuser($event, $user) {
update_record('usr', array('quota' => get_config_plugin('artefact', 'file', 'defaultquota')), array('id' => $user['id']));
if (empty($user->quota)) {
update_record('usr', array('quota' => get_config_plugin('artefact', 'file', 'defaultquota')), array('id' => $user['id']));
}
}
......
......@@ -134,9 +134,6 @@ if (isset($key)) {
set_profile_field($user->id, $field, $profilefields[$field]);
}
$registration->quotaused = 0;
$registration->quota = get_config_plugin('artefact', 'file', 'defaultquota');
db_commit();
handle_event('createuser', $registration);
......
Supports Markdown
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