diff --git a/application/forms/Config/UserGroupForm.php b/application/forms/Config/UserGroupForm.php index 80a48643f..b2ac015e4 100644 --- a/application/forms/Config/UserGroupForm.php +++ b/application/forms/Config/UserGroupForm.php @@ -33,6 +33,24 @@ class UserGroupForm extends RepositoryForm } } + /** + * Update a group + * + * @return bool + */ + protected function onUpdateSuccess() + { + if (parent::onUpdateSuccess()) { + if (($newName = $this->getValue('group_name')) !== $this->getIdentifier()) { + $this->getRedirectUrl()->setParam('group', $newName); + } + + return true; + } + + return false; + } + /** * Create and add elements to this form to delete a group *