You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating or updating a user in the control panel, and selecting permissions (other than 'admin') for this user, saving the user results in an exception.
Even with an admin account, the exception persists.
Saving the user without selecting permissions succeeds without any issues.
Steps to reproduce
Create a new user or update an existing user
Select permissions other than the 'admin' permissions
Save the user
Expected behavior
User gets created/updated with the given permissions
Actual behavior
User doesn't get created/updated, an ErrorException occurs.
Any chance you have some custom code running on UserPermissions::EVENT_REGISTER_PERMISSIONS event? The error thrown looks like craft\services\UserPermissions::getAllPermissions() is returning a malformed array.
Any chance you have some custom code running on UserPermissions::EVENT_REGISTER_PERMISSIONS event? The error thrown looks like craft\services\UserPermissions::getAllPermissions() is returning a malformed array.
We do hook on this event, but don't actually do anything with it.
What happened?
Description
When creating or updating a user in the control panel, and selecting permissions (other than 'admin') for this user, saving the user results in an exception.
Even with an admin account, the exception persists.
Saving the user without selecting permissions succeeds without any issues.
Steps to reproduce
Expected behavior
User gets created/updated with the given permissions
Actual behavior
User doesn't get created/updated, an ErrorException occurs.
Error log
Craft CMS version
4.3.1
PHP version
8.1.11
Operating system and version
Ubuntu 22.04.1 LTS
Database type and version
MySQL 8.0
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: