|
@@ 476-480 (lines=5) @@
|
| 473 |
|
* @return null |
| 474 |
|
*/ |
| 475 |
|
private function setOwnCloudAvatar() { |
| 476 |
|
if(!$this->image->valid()) { |
| 477 |
|
$this->log->log('user_ldap', 'jpegPhoto data invalid for '.$this->dn, |
| 478 |
|
\OCP\Util::ERROR); |
| 479 |
|
return; |
| 480 |
|
} |
| 481 |
|
//make sure it is a square and not bigger than 128x128 |
| 482 |
|
$size = min(array($this->image->width(), $this->image->height(), 128)); |
| 483 |
|
if(!$this->image->centerCrop($size)) { |
|
@@ 483-488 (lines=6) @@
|
| 480 |
|
} |
| 481 |
|
//make sure it is a square and not bigger than 128x128 |
| 482 |
|
$size = min(array($this->image->width(), $this->image->height(), 128)); |
| 483 |
|
if(!$this->image->centerCrop($size)) { |
| 484 |
|
$this->log->log('user_ldap', |
| 485 |
|
'croping image for avatar failed for '.$this->dn, |
| 486 |
|
\OCP\Util::ERROR); |
| 487 |
|
return; |
| 488 |
|
} |
| 489 |
|
|
| 490 |
|
if(!$this->fs->isLoaded()) { |
| 491 |
|
$this->fs->setup($this->uid); |