mirror of
https://github.com/flarum/core.git
synced 2025-10-18 10:16:09 +02:00
Remove ability for users to delete themselves
This commit is contained in:
@@ -28,7 +28,7 @@ class UsersServiceProvider extends ServiceProvider
|
||||
|
||||
$events->listen(ModelAllow::class, function (ModelAllow $event) {
|
||||
if ($event->model instanceof User) {
|
||||
if (in_array($event->action, ['edit', 'delete']) &&
|
||||
if ($event->action === 'edit') &&
|
||||
$event->model->id == $event->actor->id) {
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user