chore(user_ldap): Rename avatar setting method to a more suited name

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-01-13 15:54:48 +01:00
parent 9c717aa701
commit c0cb8ec7d4
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -691,7 +691,7 @@ class User {
return true;
}
$isSet = $this->setOwnCloudAvatar();
$isSet = $this->setNextcloudAvatar();
if ($isSet) {
// save checksum only after successful setting
@ -712,9 +712,8 @@ class User {
/**
* @brief sets an image as Nextcloud avatar
* @return bool
*/
private function setOwnCloudAvatar() {
private function setNextcloudAvatar(): bool {
if (!$this->image->valid()) {
$this->logger->error('avatar image data from LDAP invalid for ' . $this->dn, ['app' => 'user_ldap']);
return false;
@ -728,10 +727,6 @@ class User {
return false;
}
if (!$this->fs->isLoaded()) {
$this->fs->setup($this->uid);
}
try {
$avatar = $this->avatarManager->getAvatar($this->uid);
$avatar->set($this->image);