diff options
Diffstat (limited to 'lib/private/User/Database.php')
-rw-r--r-- | lib/private/User/Database.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php index 0b38f04bfe3..f106c2e8b6d 100644 --- a/lib/private/User/Database.php +++ b/lib/private/User/Database.php @@ -212,11 +212,13 @@ class Database extends ABackend implements * @param string $displayName The new display name * @return bool * + * @throws \InvalidArgumentException + * * Change the display name of a user */ public function setDisplayName(string $uid, string $displayName): bool { if (mb_strlen($displayName) > 64) { - return false; + throw new \InvalidArgumentException('Invalid displayname'); } $this->fixDI(); |