mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Fix avatar files not being deleted. Fixes #1918
This commit is contained in:
committed by
Daniël Klabbers
parent
bab49650e6
commit
bf46ea3840
@@ -44,7 +44,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