diff options
-rw-r--r-- | lib/private/Avatar.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php index 47f7ffdab37..833d430ac01 100644 --- a/lib/private/Avatar.php +++ b/lib/private/Avatar.php @@ -146,16 +146,13 @@ class Avatar implements IAvatar { * @return void */ public function remove () { - $regex = '/^avatar\.([0-9]+\.)?(jpg|png)$/'; $avatars = $this->folder->getDirectoryListing(); $this->config->setUserValue($this->user->getUID(), 'avatar', 'version', (int)$this->config->getUserValue($this->user->getUID(), 'avatar', 'version', 0) + 1); foreach ($avatars as $avatar) { - if (preg_match($regex, $avatar->getName())) { - $avatar->delete(); - } + $avatar->delete(); } $this->user->triggerChange('avatar', ''); } |