userDisplayName; } /** * Setting avatars isn't implemented for guests. * * @param \OCP\IImage|resource|string $data */ public function set($data): void { // unimplemented for guest user avatars } /** * Removing avatars isn't implemented for guests. */ public function remove(bool $silent = false): void { // unimplemented for guest user avatars } /** * Generates an avatar for the guest. */ public function getFile(int $size, bool $darkTheme = false): ISimpleFile { $avatar = $this->generateAvatar($this->userDisplayName, $size, $darkTheme); return new InMemoryFile('avatar.png', $avatar); } /** * Updates the display name if changed. * * @param string $feature The changed feature * @param mixed $oldValue The previous value * @param mixed $newValue The new value */ public function userChanged(string $feature, $oldValue, $newValue): void { if ($feature === 'displayName') { $this->userDisplayName = $newValue; } } /** * Guests don't have custom avatars. */ public function isCustomAvatar(): bool { return false; } }