|
@@ 491-495 (lines=5) @@
|
| 488 |
|
* @return null |
| 489 |
|
*/ |
| 490 |
|
private function setOwnCloudAvatar() { |
| 491 |
|
if(!$this->image->valid()) { |
| 492 |
|
$this->log->log('user_ldap', 'jpegPhoto data invalid for '.$this->dn, |
| 493 |
|
\OCP\Util::ERROR); |
| 494 |
|
return; |
| 495 |
|
} |
| 496 |
|
//make sure it is a square and not bigger than 128x128 |
| 497 |
|
$size = min(array($this->image->width(), $this->image->height(), 128)); |
| 498 |
|
if(!$this->image->centerCrop($size)) { |
|
@@ 498-503 (lines=6) @@
|
| 495 |
|
} |
| 496 |
|
//make sure it is a square and not bigger than 128x128 |
| 497 |
|
$size = min(array($this->image->width(), $this->image->height(), 128)); |
| 498 |
|
if(!$this->image->centerCrop($size)) { |
| 499 |
|
$this->log->log('user_ldap', |
| 500 |
|
'croping image for avatar failed for '.$this->dn, |
| 501 |
|
\OCP\Util::ERROR); |
| 502 |
|
return; |
| 503 |
|
} |
| 504 |
|
|
| 505 |
|
if(!$this->fs->isLoaded()) { |
| 506 |
|
$this->fs->setup($this->uid); |