mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Support jpg images for avatars from users
This commit is contained in:
parent
c655509c6d
commit
97d7fe40d6
@ -225,7 +225,7 @@ class LocalUsers extends AbstractBackend {
|
||||
}
|
||||
|
||||
/**
|
||||
* Help function to remove contacts from an addressbook.
|
||||
* Help function to rsove contacts from an addressbook.
|
||||
* This only happens when an admin remove an ownCloud user
|
||||
* @param array $contacts array with userid of ownCloud users
|
||||
* @param string $addressBookId
|
||||
|
@ -53,7 +53,13 @@ class User extends BaseTemporaryPhoto {
|
||||
* depending on the type.
|
||||
*/
|
||||
protected function processImage() {
|
||||
$localPath = \OCP\Config::getSystemValue('datadirectory') . '/' . $this->userId . '/avatar.png';
|
||||
$localPath = \OCP\Config::getSystemValue('datadirectory') . '/' . $this->userId . '/avatar.';
|
||||
if (file_exists($localPath . 'png')){
|
||||
$localPath .= 'png';
|
||||
} else if (file_exists($localPath . 'jpg')){
|
||||
$localPath .= 'jpg';
|
||||
}
|
||||
|
||||
$this->image = new \OCP\Image();
|
||||
$this->image->loadFromFile($localPath);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user