Commit 294935d7 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Redirect to the right institution's page after adding members

parent 6ba570b1
......@@ -142,8 +142,8 @@ $userlistform = pieform(array(
function institutionusers_submit(Pieform $form, $values) {
global $SESSION, $USER;
$url = '/admin/users/institutionusers.php?usertype=' . $values['usertype'];
$inst = $values['institution'];
$url = '/admin/users/institutionusers.php?usertype=' . $values['usertype'] . '&institution=' . $inst;
if (empty($inst) || !$USER->can_edit_institution($inst)) {
$SESSION->add_error_msg(get_string('notadminforinstitution', 'admin'));
redirect($url);
......
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