Winter CMS Build
1.1
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
No response
Issue description
I want to prevent User Group deletion when an admin is deleted. The records exists but not the relations. After restoring the admin, groups are not restored.
Tried with changing the core User.php file with:
public $belongsToMany = [
'groups' => [UserGroup::class, 'table' => 'backend_users_groups', 'softDelete' => true]
];
Doesnt help. I even tried to modify SoftDelete trait and commented out the methods for deleting the relations, doesnt help either.
Steps to replicate
.
Workaround
No response