Commit 2a62fc84 authored by Nigel McNie's avatar Nigel McNie
Browse files

Unconditionally redirect after submitting the changerole form, which prevents...

Unconditionally redirect after submitting the changerole form, which prevents crashing if someone attempts to submit the form without changing the role.
parent 3ef17736
......@@ -78,8 +78,8 @@ function changerole_submit(Pieform $form, $values) {
if ($values['role'] && $values['role'] != $currentrole) {
set_field('group_member', 'role', $values['role'], 'group', $group->id, 'member', $user->id);
$SESSION->add_ok_msg(get_string('rolechanged', 'group'));
redirect('/group/members.php?id='.$group->id);
}
redirect('/group/members.php?id='.$group->id);
}
define('TITLE', $group->name . ' - ' . get_string('changerole', 'group'));
......
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