mirror of
https://github.com/flarum/core.git
synced 2025-08-03 15:07:53 +02:00
Fix avatar files not being deleted. Fixes #1918
This commit is contained in:
committed by
Daniël Klabbers
parent
2a8ed53934
commit
308f2c9efd
@@ -46,7 +46,7 @@ class AvatarUploader
|
|||||||
|
|
||||||
public function remove(User $user)
|
public function remove(User $user)
|
||||||
{
|
{
|
||||||
$avatarPath = $user->avatar_path;
|
$avatarPath = $user->getOriginal('avatar_url');
|
||||||
|
|
||||||
$user->afterSave(function () use ($avatarPath) {
|
$user->afterSave(function () use ($avatarPath) {
|
||||||
if ($this->uploadDir->has($avatarPath)) {
|
if ($this->uploadDir->has($avatarPath)) {
|
||||||
|
Reference in New Issue
Block a user