diff --git a/lib/private/avatar.php b/lib/private/avatar.php index 3dcb683866..ef7d99fd29 100644 --- a/lib/private/avatar.php +++ b/lib/private/avatar.php @@ -137,6 +137,7 @@ class Avatar implements IAvatar { $avatar->delete(); } } + $this->user->triggerChange(); } /** diff --git a/tests/lib/avatartest.php b/tests/lib/avatartest.php index 264ce163e2..e7d7831108 100644 --- a/tests/lib/avatartest.php +++ b/tests/lib/avatartest.php @@ -163,7 +163,8 @@ class AvatarTest extends \Test\TestCase { ->method('putContent') ->with($image->data()); - $this->user->expects($this->once())->method('triggerChange'); + // One on remove and once on setting the new avatar + $this->user->expects($this->exactly(2))->method('triggerChange'); $this->avatar->set($image->data()); }