summaryrefslogtreecommitdiffstats
path: root/lib/private/Avatar.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-10-20 20:08:45 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-11-29 14:23:15 +0100
commit03d9e7e963c704eb5b4f48c495fac9310b9f2e0d (patch)
tree59e7aac4e9bfaf99a5072fd1ed7672ecc1612687 /lib/private/Avatar.php
parentba648eecdff7dcb4feff676ca2cfc9c8b4f01ef5 (diff)
downloadnextcloud-server-03d9e7e963c704eb5b4f48c495fac9310b9f2e0d.tar.gz
nextcloud-server-03d9e7e963c704eb5b4f48c495fac9310b9f2e0d.zip
Sinc we use AppData the regex is not needed anymore
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Avatar.php')
-rw-r--r--lib/private/Avatar.php5
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', '');
}