Commit 0f72926c authored by Robert Lyon's avatar Robert Lyon Committed by Aaron Wells

Fix data in service group on creation

Bug #1396433: Service groups should be disabled upon creation,
and tokenuser cannot be null (or it'll crash)

Change-Id: Id33279390c275e4c1b6f5316d85700a445970d71
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 0d42d645
......@@ -81,7 +81,7 @@ function webservices_function_groups_submit(Pieform $form, $values) {
$SESSION->add_error_msg(get_string('invalidinput', 'auth.webservice'));
}
else {
$service = array('name' => $service, 'restrictedusers' => 0, 'enabled' => 1, 'component' => 'webservice', 'timecreated' => time());
$service = array('name' => $service, 'restrictedusers' => 0, 'enabled' => 0, 'tokenusers' => 0, 'component' => 'webservice', 'timecreated' => time());
insert_record('external_services', $service);
$SESSION->add_ok_msg(get_string('configsaved', 'auth.webservice'));
}
......
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