mirror of
https://github.com/flarum/framework.git
synced 2025-02-06 08:53:00 +08:00
Fix avatar files not being deleted. Fixes #1918
This commit is contained in:
parent
4506c7cfa3
commit
64dfe9559b
|
@ -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)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user