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
I created a new role and assigned it to a user. Later I deleted that role from roles.yaml . After deleting the role, visiting /cp/users causes a fatal error.
This is caused by User::explicitRoles() not filtering out null results. (vendor/statamic/cms/src/Auth/Eloquent/User.php)
Start a statamic project and configure the app to store users in the database. Create a new role and assign it to a user. Delete the role from roles.yaml and try to visit /cp/users.
Bug description
I created a new role and assigned it to a user. Later I deleted that role from
roles.yaml
. After deleting the role, visiting/cp/users
causes a fatal error.This is caused by
User::explicitRoles()
not filtering out null results. (vendor/statamic/cms/src/Auth/Eloquent/User.php)It can be fixed by filtering the results before mapping them:
How to reproduce
Start a statamic project and configure the app to store users in the database. Create a new role and assign it to a user. Delete the role from
roles.yaml
and try to visit/cp/users
.Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: