Skip to content

Commit 314afd7

Browse files
committed
Fixed #13061
Resolves #13071
1 parent cbbdfd7 commit 314afd7

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Fixed a JavaScript error that could occur on field layout designers, if any tabs didn’t have any elements. ([#13062](https://github.com/craftcms/cms/issues/13062))
1818
- Fixed a bug where selecting an image with a transform within an asset selector modal wasn’t ever resolving.
1919
- Fixed a PHP error that could occur if there was a problem sending a password-reset email. ([#13070](https://github.com/craftcms/cms/pull/13070))
20+
- Fixed a bug where users’ User Groups and Permissions settings were getting cleared in the UI when sending an activation email, if the email failed to send. ([#13061](https://github.com/craftcms/cms/issues/13061))
2021
- Fixed XSS vulnerabilities.
2122
- Updated yii2-debug to 2.1.22. ([#13058](https://github.com/craftcms/cms/issues/13058))
2223

src/templates/_includes/permissions.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{% set checked = true %}
2020
{% else %}
2121
{% if subject %}
22-
{% if craft.app.request.isPost %}
22+
{% if craft.app.request.getActionSegments() == ['users', 'save-user'] %}
2323
{% set checked = permissionName in craft.app.request.getBodyParam('permissions', []) %}
2424
{% else %}
2525
{% set checked = subject.can(permissionName) %}

src/templates/users/_edit.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{% set requireEmailVerification = craft.app.projectConfig.get('users.requireEmailVerification') ?? true %}
1515
{% set canAdministrateUsers = currentUser.can('administrateUsers') %}
1616

17-
{% if craft.app.request.isPost %}
17+
{% if craft.app.request.getActionSegments() == ['users', 'save-user'] %}
1818
{% set currentGroupIds = craft.app.request.getBodyParam('groups') ?: [] %}
1919
{% else %}
2020
{% set currentGroupIds = user.getGroups()|column('id') %}

0 commit comments

Comments
 (0)