diff --git a/lib/private/Avatar/GuestAvatar.php b/lib/private/Avatar/GuestAvatar.php index c0c7de0c07889..aa515e1ad4b67 100644 --- a/lib/private/Avatar/GuestAvatar.php +++ b/lib/private/Avatar/GuestAvatar.php @@ -8,6 +8,7 @@ */ namespace OC\Avatar; +use OCP\Color; use OCP\Files\SimpleFS\InMemoryFile; use OCP\Files\SimpleFS\ISimpleFile; use OCP\IConfig; @@ -88,4 +89,13 @@ public function userChanged(string $feature, $oldValue, $newValue): void { public function isCustomAvatar(): bool { return false; } + + + /** + * Different color than for authorized user with the same name + * to make it harder to impersonate people. + */ + public function avatarBackgroundColor(string $hash): Color { + return parent::avatarBackgroundColor($hash . ' (guest)'); + } }